[Cfp-interest 1927] action item: suggest rewordings for F9.2 of n2596.pdf
David Hough CFP
pcfp at oakapple.net
Thu Feb 18 17:59:36 PST 2021
Subject: action item: suggest rewordings for "numerically equal" and "numerically equivalent" in F9.2 of n2596.pdf
Existing:
F9.2 Expression Transformations
x/2 <-> x * 0.5 page 449 (also in C18)
Although similar transformations involving inexact constants generally do not
yield numerically equivalent expressions, if the constants are exact then such transformations can be made on IEC 60559 machines and others that round
perfectly.
=== suggestion
change "numerically equivalent" to "equivalent"
===
page 450 (added since C18)
EXAMPLE 1. * x -> x is valid for decimal floating-point expressions x,
but 1.0 * x -> x is not:
1. ? 12.34 = (+1, 1, 0) ? (+1, 1234,?2) = (+1, 1234,?2) = 12.34
1.0 ? 12.34 = (+1, 10,?1) ? (+1, 1234,?2) = (+1, 12340,?3) = 12.340
The results are numerically equal, but have different quantum exponents,
hence have different values.
=== suggestion
change "numerically equal" to "equal"
===
F9.3 Relational operators page 450 (also in C18)
x < y -> isless(x,y)
Though numerically equal, these expressions are
not equivalent because of side effects when x or y is a NaN and the state
of the FENV_ACCESS pragma is "on".
This transformation, which would be
desirable if extra code were required to cause the "invalid" floating-point
exception for unordered cases, could be performed provided the state of the
FENV_ACCESS pragma is "off".
=== suggestion
change "numerically equal" to "the same boolean values"
===
More information about the Cfp-interest
mailing list