error in the difference between two double numbers
Andrea Di:
Nope it is correct:it's a simple question, try to make the difference between two double numbers and tell me if you also get an error in the result.
for example I am subtracting the current and previous value of a sma and the result is wrong.
1.126476 - 1.12655 =
-0.000074 =
-7.4*10^-5(times ten to the negative power of five) =
-7.4 e-05
Andrea Di:
https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.htmlit's a simple question, try to make the difference between two double numbers and tell me if you also get an error in the result.
for example I am subtracting the current and previous value of a sma and the result is wrong.
That's how floating point works.
it's a simple question, try to make the difference between two double numbers and tell me if you also get an error in the result.
WOWfor example I am subtracting the current and previous value of a sma and the result is wrong.