JTC1/SC22/WG14
N1048
WG14 N1048
CORRECTIONS TO REQUIREMENTS ON
INEXACT FLOATING-POINT EXCEPTIONS
P.J. Plauger
Dinkumware, Ltd.
pjp@dinkumware.com
The intent of Annex F is to *require* the rint functions to raise
inexact if the result differs from the argument value. This is in
contrast to the weaker clause 7 statement that the rint functions
*may* raise inexact. Moreover, nextafter has the behavior
suggested by IEC 60559 and thus should not be changed. With
these changes, the suggested changes are acceptable.
Proposed Committee Response
Change F.9, paragraph 8 from:
: Whether or when the trigonometric, hyperbolic, base-e exponential,
: base-e logarithmic, error, and log gamma functions raise the
: inexact floating-point exception is implementation-defined.
: For other functions, the inexact floating-point exception is
: raised whenever the rounded result is not identical to the
: mathematical result.
to:
: Whether or when library functions raise the inexact floating-point
: exception is unspecified, unless explicitly specified otherwise.
Change F.9, paragraph 9 from:
: Whether the inexact floating-point exception can be raised
: when the rounded result actually does equal the mathematical result
: is implementation-defined. Whether the underflow (and inexact)
: floating-point exception can be raised when a result is tiny
: but not inexact is implementation-defined.(312) Otherwise, as
: implied by F.7.6, the <math.h> functions do not raise spurious
: floating-point exceptions (detectable by the user).
to:
: Whether or when library functions raise an undeserved underflow
: floating-point exception is unspecified.(312) Otherwise, as
: implied by F.7.6, the <math.h> functions do not raise spurious
: floating-point exceptions (detectable by the user), other than
: the inexact floating-point exception.
Change Footnote 312 from:
: It is intended that undeserved underflow and inexact
: floating-point exceptions are raised only if determining
: inexactness would be too costly.
to:
: It is intended that undeserved underflow and inexact
: floating-point exceptions are raised only if avoiding them
: would be too costly.
Change F.9, paragraph 10 from:
: Whether the functions honor the rounding direction mode is
: implementation-defined.
to:
: Whether the functions honor the rounding direction mode is
: implementation-defined, unless explicitly specified otherwise.
Remove J.3.1.2 (from implementation-defined behavior):
: Whether or when the trigonometric, hyperbolic, base-e
: exponential, base-e logarithmic, error, and log gamma
: functions raise the inexact floating-point exception
: in an IEC 60559 conformant implementation (F.9).