[Cfp-interest 2307] infinity and exceptions
Fred J. Tydeman
tydeman at tybor.com
Tue Dec 28 20:09:46 PST 2021
I wonder if we should change 5.2.4.2.2#4:
A quiet NaN propagates through almost
every arithmetic operation without raising a floating-point exception; a signaling NaN generally
raises a floating-point exception when occurring as an arithmetic operand.23)
to
Both infinity and a quiet NaN propagates through almost
every arithmetic operation without raising a floating-point exception; a signaling NaN generally
raises a floating-point exception when occurring as an arithmetic operand.23)
Reason:
I do not see any place in the C standard that the use of
INFINITY shall be quiet (in most cases). One exception is
INFINITY / INFINITY (which raises invalid)..
---
Fred J. Tydeman Tydeman Consulting
tydeman at tybor.com Testing, numerics, programming
+1 (702) 608-6093 Vice-chair of PL22.11 (ANSI "C")
Sample C99+FPCE tests: http://www.tybor.com
Savers sleep well, investors eat well, spenders work forever.
More information about the Cfp-interest
mailing list