To: J3 J3/26-211 From: Malcolm Cohen Subject: Interp F23/027 on IEEE_SCALB and non-integral scaling Date: 2026-October-20 ---------------------------------------------------------------------- NUMBER: F23/027 TITLE: IEEE_SCALB is not defined for finite non-integral values of I KEYWORDS: IEEE_SCALB, ISO/IEC/IEEE 60559 DEFECT TYPE: Erratum STATUS: J3 consideration in progress REFERENCES: 24-007, N2244 (F2023 draft corrigendum 1), N2258 QUESTION: The description of IEEE_SCALB does not describe the result when I is finite and non-integral. ISO/IEC/IEEE 60559 says that says non-integral I is language-defined, but we do not define it. That means that a program which does PRINT *,IEEE_SCALB(x,1.54) has no established interpretation, and is thus non-conforming. That is probably an overreaction to a numerical error. The C standard does not have a floating-point I argument, so we cannot get guidance from them. There are two obvious possibilities: (1) raise INVALID, return NaN, because you cannot add a noninteger value to the exponent. (2) raise INEXACT and return X*(RADIX(X)**I). That would require a significant effort if we want it to avoid overflow/underflow in the calculation of RADIX(X)**I. It also fails to alert the user to the mistake (no-one looks at INEXACT, which was likely already set from an earlier calculation anyway). What should the result be, or should this continue to be completely non-conforming. ANSWER: This was not intended to be non-conforming. The robust result is that INVALID should be raised, and the result should be a quiet NaN. An edit is provided to correct this oversight. EDIT to 24-007. [488:16+] 17.11.37 IEEE_SCALB, p6 Result Value, Append new case "Case (v): If X and I are finite, and I is non-integral, the IEEE_INVALID exception shall occur. If IEEE_SUPPORT_NAN(X) is true, the result value is a quiet NaN." EDIT to N2258. [581:13+] 18.11.37 IEEE_SCALB, p6 Result Value, Append new case "Case (v): If X and I are finite, and I is non-integral, the IEEE_INVALID exception shall occur. If IEEE_SUPPORT_NAN(X) is true, the result value is a quiet NaN." SUBMITTED BY: Malcolm Cohen HISTORY: 26-nnn m241 Submitted ----------------------------------------------------------------------