To: J3 J3/23-156r1
From: John Reid & Malcolm Cohen
Subject: IEEE_SCALB underflow interp
Date: 2023-June-14
----------------------------------------------------------------------
NUMBER: F23/006
TITLE: Underflow in IEEE_SCALB
KEYWORDS: Underflow, IEEE_SCALB
DEFECT TYPE: Erratum
STATUS: J3 consideration in progress
REFERENCES: N2213 (FDIS)
QUESTION:
If X * 2**I is too small to be represented with full accuracy, was it
intended that IEEE_SCALB(X,I) should return the representable number
having a magnitude nearest to ABS(2**I) and the same sign as X? For
example, if X is IEEE binary32 with the value 2E-38, was it
intended that IEEE_SCALB(X,-1) should return the value 0.5?
ANSWER:
No, it was intend that it should return the representable number
having a magnitude nearest to ABS(X*2**I) and the same sign as X.
An edit is supplied.
This error dates back to Fortran 2003. Therefore this is an
incompatibility with Fortran 2003, 2008, and 2018. Edits to the
compatibility subclause are provided.
EDITS to N2218:
[xiii] Introduction, Intrinsic modules bullet, append sentence
"The result of the function IEEE_SCALB from the intrinsic module
IEEE_ARITHMETIC has been corrected to conform to \theIEEEstd."
[33:13+] 4.3.3 Fortran 2018 compatibility, last paragraph, new bullet
"- The result of a reference to the function IEEE_SCALB from the
intrinsic module IEEE_ARITHMETIC has been corrected to return
the representable number having a magnitude nearest to
ABS(X*2**I) with the same sign as X, if X*2**I is too small to
be represented with full accuracy."
[34:17+] 4.3.4 Fortran 2008 compatibility, last paragraph, new bullet
with text identical to preceding edit.
[35:13+] 4.3.5 Fortran 2003 compatibility, last paragraph, new bullet
with text identical to the edit for [33:13+].
[487:15] 17.11.37 IEEE_SCALB, Result Value paragraph, Case (iii),
change "|2^I|" to "|X \times 2^I|".
SUBMITTED BY: John Reid
HISTORY: 23-156 m230 Submitted
23-156r1 m230 Revised edits.
----------------------------------------------------------------------