Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-05-15 14:27:04


Robert Ramey wrote:
> David Abrahams wrote:
>> "Robert Ramey" <ramey_at_[hidden]> writes:
>>
>>> I think we should go in the opposite direction. A float is a
>>> a legitmate floating point value. A union of float and some
>>> other special non-floating point values is something else.
>>
>> Notwithstanding the fact that NaN is "not a number," it is a
>> legitimate floating-point value, i.e. a legitimate value for the type
>> float.
>
> I guess it depends what one means by "legitimate". It is
> is certainly "legal" in C++ - no question about that fact.
> Its certainly not a number - no question about that either.

It depends. Where do you draw the line? Is inf a number? Is -0.0 a number?
You have to have NaN if you want to be able to represent x/y as a float.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk