Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2008-02-26 04:31:12

Johan Råde wrote:
> If I enable SSE2 on VC71 and optimize the code for speed (/O2), then
> -std::numeric_limits<double>::quiet_nan()
> returns a positive NaN (binary expansion 7ff8000000000000), while
> boost::math::changesign(std::numeric_limits<double>::quiet_nan())
> returns a negative NaN (binary expansion fff8000000000000).
> If I turn off the compiler optimization, then both return a negative
> NaN.
> Conclusion: boost::math::changesign is useful.

Well, if that's the only use, then personally I won't be using it, what use
is a negative NaN over a positive one? This feels like a very borderline
use case to me, but maybe I'm missing something?


Boost list run by bdawes at, gregod at, cpdaniel at, john at