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

    From pmk@21:1/5 to All on Fri Jun 17 17:05:26 2022
    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().

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gah4@21:1/5 to pmk on Fri Jun 17 17:37:29 2022
    On Friday, June 17, 2022 at 5:05:29 PM UTC-7, pmk wrote:
    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().

    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)