Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

The standard seems to have a bad example value for TINY(0.0)

41 views
Skip to first unread message

pmk

unread,
Jun 17, 2022, 8:05:29 PM6/17/22
to
According to the standard (F'2018: 16.9.191), TINY(0.0) is 2**(-127) for 32-bit IEEE. I think that's off by a factor of 0.5. The smallest normal 32-bit IEEE-754 number is actually 2**(-126).

Every Fortran compiler to which I have access agrees with me and has TINY(0.0) == 2**(-126).

This error, if it is one, may also affect the example results for RANGE().

gah4

unread,
Jun 17, 2022, 8:37:33 PM6/17/22
to
Smallest significand of 1.0000000000000 and exponent of -126 agrees with you.

Personally, I think denormals were a bad idea. They give a tiny bit more exponent
range, but a lot more work.
0 new messages