isinf() on NaN args
Bruce Evans
brde at optusnet.com.au
Wed Jun 5 09:00:32 UTC 2013
Is isinf(x) (or even fpclassify(x)) permitted to raise FE_INVALID if
x is a (quiet) NaN? It shouldn't, but I can't find where C99 requires
this. I can only find where C99 requires FE_INVALID to not be raised
for comparison macros.
It should raise if x is a signaling NaN, but C99 doesn't specify
signaling NaNs and the hardware behaviour is more varied and the
software bugs are larger for signaling NaNs, so getting this wrong in
many cases doesn't matter much.
Bruce
More information about the freebsd-numerics
mailing list