09-221r1
To: J3 Members
From: Stan Whitlock
Subject: J3 Fortran interp F03/0034
Date: 2009 May 6
NUMBER: F03/0034
TITLE: IEEE_LOGB()
KEYWORDS: IEEE-754, ieee_logb()
DEFECT TYPE: Erratum
STATUS: Passed by J3 meeting
QUESTION:
What is ieee_logb(denormal)? Is it of the hardware representation,
or is it as if the hardware had an unbounded exponent range?
What is ieee_logb(NaN)? ieee_logb(-INF)? ieee_logb(+INF)?
ieee_logb() should be defined as if the hardware representation had
an unbounded exponent range.
ieee_logb(NaN) should be the same NaN; shall be a NaN.
ieee_logb(-INF) shall be +INF
ieee_logb(+INF) shall be +INF
ANSWER:
Case (i) of 14.10.12 correctly specifies that if the value of X is
denormal, its unbiased exponent is returned, that IEEE_LOGB(X) is
equal to EXPONENT(X)-1. That this conclusion is true is the subject
of F2003 interp F03/0054, answered in Corrigendum 1.
For consistency with the IEEE International Standard, edits are
also supplied for the case where X is infinite and X is NaN.
EDITS:
Page and line numbers refer to 04-007.
Subclause 14.10.12 "IEEE_LOGB (X)" Result value [376:17+] add:
"Case (iii) If IEEE_SUPPORT_INF(X) is true and X is infinite, the
result is +infinity.
Case (iv) If IEEE_SUPPORT_NAN(X) is true and X is a NaN, the result
is a NaN."
SUBMITTED BY: Fred Tydeman
HISTORY: 05-113 m171 F03/0034 submitted
05-113r1 m171 Passed by J3 meeting
05-170 m172 Passed J3 letter ballot #11
N1622 m172 Failed WG5 ballot N1629
09-221 m188 Revised answer
09-221r1 m188 Passed by J3 meeting