To: J3 J3/23-156 From: John Reid Subject: IEEE_SCALB underflow interp Date: 2023-June-08 ---------------------------------------------------------------------- NUMBER: Fxx/xxx 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 of IEEE real type 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. The same error was made in Fortran 2018, in 17.11.33. It was equally wrong there and should have been corrected in an interpretation. Because the change is being made now, it should be recorded as a difference from Fortran 2018. An edit is supplied. EDITS to N2213: In Introduction, Intrinsic modules bullet item. Add at the end "The function IEEE_SCALB(X,I) from the intrinsic module IEEE_ARITHMETIC has been corrected to return the representable number having a magnitude nearest to ABS(X*2**I) and the same sign as X if X*2**I is too small to be represented with full accuracy." In 17.11.37 IEEE_SCALB (X, I), Result Value, Case (iii), change "|2^I|" to "|X \times 2^I|". SUBMITTED BY: John Reid HISTORY: 23-xxx m230 Submitted ----------------------------------------------------------------------