[J3] Question on TINY example
Steven G. Kargl
kargl at uw.edu
Wed Jun 22 18:19:03 UTC 2022
On Wed, Jun 22, 2022 at 05:40:37PM +0000, Mark LeAir via J3 wrote:
> Another one of our compiler engineers pointed this out to me. Do we agree this example needs fixing?
>
> In F'2018, 16.9.191, the example has TINY(x) == 2**(-127) for default real. I think that should be 2**(-126).
>
> 32-bit IEEE-754 has an exponent bias of 127. For example, 1.0 is 0x3f800000, whose exponent field is 127. So the smallest normal value, which has an exponent field of 1, is 2**(-126) times 1.0. And TINY() is the smallest normal (full precision) value.
>
> If this example is fixed, then so should the example for RANGE (16.9.158).
>
> If the example for TINY() is not wrong, then the floating-point model used for examples is not IEEE-754, and if that's the case, that should be fixed.
>
> The example for TINY() in draft F'202X is the same (16.9.209).
>
The description of TINY is correct with respect to the model given
in 16.4 NOTE 1. I cannot find any text that claims the model in
NOTE 1 represents to IEEE-754 binary24.
--
Steve
More information about the J3
mailing list