Why does division by zero with floating point (or double precision) numbers not throw java.lang.ArithmeticException: / by zero in Java

In short, that’s the way it’s specified in the IEEE-754 standard, which is what Java’s Floating-Point Operations are based on. Why doesn’t division by zero (or overflow, or underflow) stop the program or trigger an error? Why does a standard on numbers include “not-a-number” (NaN)? The 754 model encourages robust programs. It is intended not … Read more