[J3] Several mistakes in EXPONENT
Fred J. Tydeman
tydeman at tybor.com
Tue Jan 26 17:06:22 UTC 2021
On Tue, 26 Jan 2021 13:22:44 +0000 Clune, Thomas L. (GSFC-6101) via J3 wrote:
>
>(p368, lines 35-36): "If X has the value zero, the result has the value zero. If X is an IEEE infinity or NaN, the result has the value
>HUGE (0)."
I only have access to ISO 1539-1:2010, so not sure if things have been changed.
I believe that EXPONENT(0.0) should be -HUGE(0)
That is, the most negative integer.
Also, EXPONENT(1.0) should be the value 0 as 2**0 is 1 (based upon the Note 13.5).
What is supposed to happen if 'e' is not within the range of default integers?
Does this function depend upon the radix used for floating point on the hardware?
For example, IBM S/360 hex floating point would have different results than
IEEE-754 binary floating point, which would differ from IEEE-754 decimal
floating point.
---
Fred J. Tydeman Tydeman Consulting
tydeman at tybor.com Testing, numerics, programming
+1 (702) 608-6093 Vice-chair of PL22.11 (ANSI "C")
Sample C99+FPCE tests: http://www.tybor.com
Savers sleep well, investors eat well, spenders work forever.
More information about the J3
mailing list