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.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.