Re: strtod ("nan") returns negative NaN

Joseph Myers <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
On Wed, 15 Aug 2018, Joseph Myers wrote:

> On Tue, 14 Aug 2018, Craig Howland wrote:
> 
> >      The f_QNAN value should be 0x7fc00000 regardless of byte ordering.  In
> 
> It would be better to use __builtin_nan ("") (and __builtin_nanf, 
> __builtin_nanl for other types) rather than using an integer 
> representation at all (of course that requires changes to other code to 
> avoid requiring an integer representation there).

(This is not an objection to any of the present patch proposals, just an 
observation that a different approach would avoid a series of problems 
that result from trying to hardcode information about such choices of 
bit-patterns for NaNs.)

-- 
Joseph S. Myers
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.