On Wed, Jul 26, 2000 at 01:26:22PM +0200, Kaiserovi wrote:
> That's a safe way. Another solution would be to generate a genuine NaN
> double in Number::operator double() if you know how - I don't.

        #include <nan.h>
        // ...
        x = NAN;

I'm not sure how portable that is though - I think nan.h is part of glibc.
Alternatively, you can do

        x = 0.0 / 0;

which is probably better.

But why not go the whole way - drop the _NaN member,
have setNaN() do sthg like the above, & isNaN use isnan()
from math.h ?

 .robin.


-- 
"What you decide to be is what you are"

Reply via email to