Re:0.30000000000000004
by lmm on Tuesday December 03, 2019 @09:05AM
(#21692303)
False. Floating-point arithmetic in Java is generally nondeterministic. You will notice that the strictfp keyword exists and is off by default.
[ Parent
| on HN ]
Re:0.30000000000000004
by chrisseaton on Tuesday December 03, 2019 @09:32AM
(#21692504)
It's not false - strictfp mandates deterministic FP. If you use that your program will always run all floating point calculations in exactly the same way, full stop.
Secondly, on mainstream implementations, strictfp is already documented the same as default! They're planning to remove it anyway as it's a no-op in almost all cases.
See JEP 306.
> It's not false - strictfp mandates deterministic FP. If you use that your program will always run all floating point calculations in exactly the same way, full stop.
If you use it. Which is not the default. Your original claim remains false.