J3/05-192 Date: 06 Jun 2005 To: J3 From: Fred Tydeman Subject: Relational equivalence NUMBER: F03/0065 TITLE: relational equivalence KEYWORDS: transformation, relational equivalence, mathematical value DEFECT TYPE: Interpretation STATUS: For consideration QUESTION: Given REAL X X = ... some value ... may IF( X+3.0 .EQ. 3.0 )... be transformed into IF( X .EQ. 0.0 )... by the processor? References are to J3/04-007. 7.1.8.3 Evaluation of numeric intrinsic operations has a discussion of "mathematically equivalent", "mathematical value" and "computational results". 7.1.8.5 Evaluation of relational intrinsic operations has "Two relational intrinsic operations are relationally equivalent if their logical values are equal for all possible values of their primaries." "values" in that context is ambiguous to me. Is it the infinite set of mathematical values or is it the finite set of hardware representable (computational) values? My brief scan of F2003 finds that "values" without any adjectives means what the hardware can represent. Assuming "values" in 7.1.8.5 means what the hardware can represent, then I conclude that the transformation cannot be done. However, Note 7.22 shows "I > J" transformed into "J-I < 0"; which is not true for the finite set of hardware values (due to undefined behavior of overflow), but is true for the infinite set of mathematical values. I believe that "possible values" should be changed to either: possible mathematical values or possible computational values ANSWER: DISCUSSION: EDITS: SUBMITTED BY: Fred Tydeman HISTORY: J3/05-192 m173 Submitted