3 ms·
Beware of the examples in the Fortran standard for intrinsic functions like TINY() -- the example results are within the framework of a 32-bit floating-point mo
by pklausler 4y ago
Beware of the examples in the Fortran standard for intrinsic functions like TINY() -- the example results are within the framework of a 32-bit floating-point model that looks an awful lot like IEEE-754 finite numbers (24-bit precision including an implicit normalization bit, 8-bit exponent biased by 127), except for an interpretation that is off by a factor of two.
That's right. If you take any of those example calls from the Fortran standard and compile them on any modern processor, your results will differ by a factor of two one way or another.
Does the standard warn you about this? Nowhere. Does the standard committee know about this? Yes. Will they fix their documentary floating-point model to conform with the one truly ubiquitous 32-bit floating-point representation left to us? Of course not.