Tag: floating-point

IEEE 754 Floating-Point Errors and Alternatives in Java

Why storing 0.1 in a Java double causes a rounding error in the 52-bit IEEE 754 fraction, two failures it caused (NEIS grading and the Patriot missile), and how to choose between BigDecimal, integer minor units, and libraries such as Java Money.

Continue Reading