Category "double"

PostgreSQL Can't Convert String to double precision

So I'm asked to do this query for a college project: SELECT l.city AS name, AVG((pr.ap_price::double precision * 7 - pr.weekly::doub

Why is an overloaded function with two arguments of type double called when passing a long long?

I wrote those two overloads: int func(int, int) { return 1; } int func(double, double) { return 2; } When I call them with the obvious two calling

Concept related to precision of float and double

Why the precision of the float is up to 6 digits after the decimal point and the precision of the double is up to 15 digits after the decimal point? Can anyone

How to set precision for json_real while doing json_dump using jansson library

If a double value of 8.13 is passed into json_real and dump the json i see that its printing 8.1300000000000008, Is there any way to get 8.13 or 8.1300000000000

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