[Cfp-interest] printf flag character for NaNs
Fred J. Tydeman
tydeman at tybor.com
Thu Apr 14 09:13:13 PDT 2011
On Wed, 13 Apr 2011 16:46:15 -0700 (PDT) David Hough CFP wrote:
>
>Last time we wondered about using a flag character to modify the output
>treatment of NaNs (we could also use it to modify scanf input treatment
>if needed).
I missed that and the minutes also missed that discussion.
>The standard flag characters -+#0 and space already have semantics for
>floating-point output that we don't want to overlay with NaN semantics.
While # has semantics for a,A,e,E,f,F,g,G, it only affects finite numbers.
We could use it to force printing payload of NaNs. Since # means use
an "alternative form", it makes perfect sense for NaN payloads.
---
Fred J. Tydeman Tydeman Consulting
tydeman at tybor.com Testing, numerics, programming
+1 (775) 358-9748 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