[Cfp-interest 2333] nan("1111111111111111111111....")

Fred J. Tydeman tydeman at tybor.com
Sun Jan 16 10:30:49 PST 2022


F.10.8.2 The nan functions has:
2 The returned value is exact and is independent of the current rounding direction mode.

I read that as meaning no floating-point exceptions are raised by the nan() function.
However, I have found that (at least) glibc raises FP_INVALID if the string passed
to nan() has lots of valid characters.  Is that a bug in glibc?


---
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