6g3r_ |
How Java’s Floating-Point Hurts Everyone Everywhere
https://people.eecs.berkeley.edu/~wkahan/JAVAhurt.pdf
Saved on 2023-08-07 [19576 edays] via people.eecs.berkeley.edu
Modified 2023-08-07 [19576 edays]
java programming
https://people.eecs.berkeley.edu/~wkahan/JAVAhurt.pdf
Saved on 2023-08-07 [19576 edays] via people.eecs.berkeley.edu
Modified 2023-08-07 [19576 edays]
java programming
Java’s floating-point arithmetic is blighted by five gratuitous mistakes:
- Linguistically legislated exact reproducibility is at best mere wishful thinking.
- Of two traditional policies for mixed precision evaluation, Java chose the worse.
- Infinities and NaNs unleashed without the protection of floating-point traps and flags mandated by IEEE Standards 754/854 belie Java’s claim to robustness.
- Every programmer’s prospects for success are diminished by Java’s refusal to grant access to capabilities built into over 95% of today's floating-point hardware.
- Java has rejected even mildly disciplined infix operator overloading, without which extensions to arithmetic with everyday mathematical types like complex numbers, intervals, matrices, geometrical objects and arbitrarily high precision become extremely inconvenient.
To leave these mistakes uncorrected would be a tragic sixth mistake.