Category "double"

Strange warning when calling sprintf with .* width specifier

For the following code: https://godbolt.org/z/WcGf9hEs3 #include <stdio.h> int main() { char temp_buffer[8]; double val = 25.3; sprint

Convert ieee754 half-precision bytes to double and vise versa in Flutter

I have a device that provides temperature data in ieee754 half-precision float format, i.e. [78, 100] = +25.5C. Now, Dart/Flutter doesn't support HP-Float conv

Discrepancy in Squaring a number stored in double format

I am trying to square a number x but there seems to be some discrepancy in precision while squaring it using Math.pow() and squaring it using multiplication. pu

How to round a Double to the nearest Int in swift?

I'm trying to make a calculator of growth rate (Double) that will round the result to the nearest Integer and recalculate from there, as such: let firstUsers =

Solve Integer division in floating point context

When doing: double a = 1000000000 / FPS; It gives me the warning: Integer division in floating point context. How can I solve this?

Recognize changes in SwiftUI TextField with double value

I am using a TextField to let the user add a price for something. To prevent the user adding other values as a number, I change the keyboard type to .decimalPad

How do I print a double value without scientific notation using Java?

I want to print a double value in Java without exponential form. double dexp = 12345678; System.out.println("dexp: "+dexp); It shows this E notation: 1.23456

Fast real valued random generator in java

java.util.Random.nextDouble() is slow for me and I need something really fast. I did some google search and I've found only integers based fast random generat