[Cfp-interest] Floating-point extensions for C report - part 1 - sNaN/domain errors

David Hough CFP pcfp at oakapple.net
Mon Jan 30 17:33:50 PST 2012


Under F.2.1, there is an open issue about whether signaling NaN arguments
should cause domain errors.

A signaling NaN is an error if it is used by mistake, by reading uninitialized
data for instance.    The invalid exception is supposed to help with that,
as with debugging that initializes storage to signaling NaNs.

But a signaling NaN used as it was originally intended is not an error
but a means of extending the arithmetic in some way.    Each time it's
accessed, a trap occurs to some supporting software that
does something special or additional to the usual.    I think a C domain
error would not be helpful in what is going to be pretty implementation-specific
programming.


More information about the Cfp-interest mailing list