G
Guest
I'm trying to multiply two doubles and assign the result to a double as well.
But it seems the result is rounded up.
x = 907.18474
y = 2.2046226218487757
the result I calculate 1999.999999999999902722818
But this is calculated to be 2000.0.
I looked up double and it is specified as follows;
double ±5.0 × 10−324 to ±1.7 × 10308
Precision: 15-16 digits
What am I missing here?
But it seems the result is rounded up.
x = 907.18474
y = 2.2046226218487757
the result I calculate 1999.999999999999902722818
But this is calculated to be 2000.0.
I looked up double and it is specified as follows;
double ±5.0 × 10−324 to ±1.7 × 10308
Precision: 15-16 digits
What am I missing here?