It is useful to separate two ideas:
- Floating point format
- Language rules for the behavior of numbers.
Language standards bodies may indicate or leave unspecified as much or as little for IEEE floating point behavior as they see fit. You cannot tell how NaN comparisons behave, regardless of whether the IEEE floating point format is used.
For example, Java indicates a behavior for float and double that would be very difficult to implement without using the 32-bit and 64-bit IEEE 754 binary formats. On the other hand, Float and Double have comparison methods that consider NaN to be equal and more. than all other floating point numbers.
According to the PHP Floating Point Language Reference "Although this is system dependent, PHP typically uses the IEEE 754 double-precision format .."
Patricia Shanahan
source share