To: J3 J3/26-210 From: Malcolm Cohen Subject: Interp F23/026 on IEEE_SCALB Date: 2026-October-20 ---------------------------------------------------------------------- NUMBER: F23/026 TITLE: IEEE_SCALB does not conform to ISO/IEC/IEEE 60559 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: IEEE_SCALB, as per 24-007 with the changes in N2244 (corrigendum 1) still fails to conform to ISO/IEC/IEEE 60559 as listed below. It will be easier to view this in N2258 (draft CD for F2028), as that has the corrigendum changes applied in-place. Problem 1: it talks about 2**I, but 60559 states b**I, where b is the radix. That is, RADIX(X)**I. Problem 2: Case (ii), which is X*2**I too large, says that the exception IEEE_OVERFLOW occurs. 60559 states that this also raises INEXACT (see 60559:7.4). Problem 3: Case (iii), the underflow case. Again, 60559 states that this also raises INEXACT (see 60559:7.5). Problem 4: Case (iv), X infinite, says that the result is X, with no exception raised. This is only true for finite I. When I is a NaN, the result is a NaN (and INVALID signals iff I is a signalling NaN). When I is -Infinity, the limit as I approaches -INF for b**I is zero, leaving us with X*0, and INF*0 is a NaN and INVALID signals. Are these deviations from 60559 deliberate? ANSWER: No, these deviations are due to an oversight. Edits are supplied to bring IEEE_SCALB into conformance with 60559. EDITS to 24-007. [472:bottom-8] 17.10 Summary of the procedures, Table 17.2, entry for IEEE_SCALB, change "2" to "RADIX (X)". {Editor: Hyperlink to the RADIX intrinsic if reasonably possible.} [488:2] 17.11.37 IEEE_SCALB, p1 Description, Change "2" to "RADIX (X)". [488:10,11,14] Same subclause, p6 Result Value, Cases (i), (ii), (iii) Change "2" to "RADIX (X)", thrice. [488:11,14] Same paragraph, Cases (ii) and (iii), after "shall occur" insert ", together with IEEE_INEXACT", twice. [488:16] Same paragraph, Case (iv), after "infinite" insert "and I is finite or positive infinity". Append sentence "If X is infinite and I is negative infinity, the IEEE_INVALID exception shall signal; the result is a quiet NaN." {That makes that case read: Case (iv): If X is infinite and I is finite or positive infinity, the result is the same as X; no exception signals. If X is infinite and I is negative infinity, the IEEE_INVALID exception shall signal; the result is a quiet NaN."} Note: This leaves the NaN argument case unspecified, but the default handling is correct (raise INVALID if any is a signalling NaN, return a quiet NaN). EDITS to N2258. [564:middle] 18.10 Summary of the procedures, Table 18.2, entry for IEEE_SCALB, change "2" to "RADIX (X)". {Editor: Hyperlink to the RADIX intrinsic if reasonably possible.} [580:32] 18.11.37 IEEE_SCALB, p1 Description, Change "2" to "RADIX (X)". [581:6,7,10] Same subclause, p6 Result Value, Cases (i), (ii), (iii): Change "2" to "RADIX (X)", thrice. [581:7,10] Same paragraph, Cases (ii) and (iii), after "shall occur" insert ", together with IEEE_INEXACT", twice. [581:13] Same paragraph, Case (iv), after "infinite" insert "and I is finite or positive infinity". Append sentence "If X is infinite and I is negative infinity, the IEEE_INVALID exception shall signal; the result is a quiet NaN." {That makes that case read: Case (iv): If X is infinite and I is finite or positive infinity, the result is the same as X; no exception signals. If X is infinite and I is negative infinity, the IEEE_INVALID exception shall signal; the result is a quiet NaN."} Note: This leaves the NaN argument case unspecified, but the default handling is correct (raise INVALID if any is a signalling NaN, return a quiet NaN). SUBMITTED BY: Malcolm Cohen HISTORY: 26-nnn m241 Submitted ----------------------------------------------------------------------