To: J3 J3/23-120 From: John Reid Subject: Minor error in IEEE_SCALB Date: 2023-February-16 Introduction ^^^^^^^^^^^^ I have noticed an error in IEEE_SCALB (X,I). The DIS says: "If X x 2^I is too small and there is loss of accuracy, the IEEE_UNDERFLOW exception shall occur. The result is the representable number having a magnitude nearest to |2^I| and the same sign as X." I am sure that "|X x 2^I|" was intended rather than "|2^I|" and I see this as a typo. To implement it as specified would be bizarre. If A is an IEEE 32-bit real and gradual underflow is supported, TINY(A)/2 would have the value 5.88E-39 but IEEE_SCALB(TINY(A),-1) would have the value 0.5. It was corrent in the TR, which said "If 2^I X is too small and there is loss of accuracy, the IEEE_OVERFLOW exception shall occur. The result is the nearest representable number with the sign of X." The error occurred with the incorporation of the TR into F2003 and it has been there ever since, but it is just a typo and is clearly wrong. I therefore propose that it be corrected in the DIS. Edit to the DIS ^^^^^^^^^^^^^^^ In 17.11.37 IEEE_SCALB (X, I), Result Value, Case (iii), change "|2^l|" to "|X x 2^I|".