To: J3 J3/26-115r1 From: Peter Klausler Subject: F2023 interp: Integrity of parentheses in (A*B) Date: 2026-February-05 ---------------------------------------------------------------------- NUMBER: F23/ ! /interp assigns number after submission TITLE: Integrity of parentheses in (A*B) KEYWORDS: Expression evaluation, parentheses DEFECT TYPE: ! /interp assigns STATUS: J3 consideration in progress QUESTIONS: Q1: In 24-0007 subclause 10.1.5.2.4 ("Evaluation of numeric intrinsic operations") paragraph 2, the text reads "Once the interpretation of a numeric intrinsic operation is established, the processor may evaluate any mathematically equivalent expression, provided that the integrity of parentheses is not violated." Does the phrase "provided that the integrity of parentheses is not violated" apply to an intrinsic multiplication that is enclosed in explicit parentheses, such as "(A*B)", where the operands are data entities whose type is intrinsic REAL? ANSWER: Yes; a conforming processor may not violate the integrity of parentheses in a parenthesized real intrinsic multiplication. Q2: In 10.1.8 ("Integrity of parentheses") the text reads "The rules for evaluation specified in 10.1.5 state certain conditions under which a processor can evaluate an expression that is different from the one specified by applying the rules given in 10.1.2 and the rules for interpretation specified in 10.1.5. However, any expression in parentheses shall be treated as a data entity." Does the last sentence apply to a parenthesized real intrinsic multiplication, requiring that it be treated as a "data entity"? ANSWER: Yes; a conforming processor must treat a parenthesized real intrinsic multiplication as a data entity. Q3: In 3.41 "data entity", that term is defined as "data object (3.42), result of the evaluation of an expression, or the result of the execution of a function reference". If a parenthesized real intrinsic multiplication is a data entity, being the result of the evaluation of an expression, does that data entity have the type, kind, and value of the result of the multiplication, as defined by subclause 10.1.5? ANSWER: Yes, the result of the evaluation of the real intrinsic multiplication expression "A*B" is a data entity whose type, kind, and value are defined in subclause 10.1.5. Q4: When an explicitly parenthesized real intrinsic multiplication appears as an operand in an expression, as in "(A*B)+C", does the parenthesized multiplication have the type, kind, and value of the data entity that 10.1.8 ("Integrity of parentheses") requires that it "shall be treated as"? ANSWER: Yes. EDITS to 24-007: None, if all four answers are "Yes". If any answer is "No", edits may be required to clarify the reasoning behind the answer. SUBMITTED BY: Peter Klausler HISTORY: 26-nnn m239 Submitted