James Kuyper
8/29/2011 7:50:00 PM
On 08/29/2011 02:27 PM, Malcolm McLean wrote:
> On Aug 29, 6:42 pm, James Kuyper <jameskuy...@verizon.net> wrote:
>>
>> It would be more appropriate to say that a NaN indicates a special case,
>> rather than an error.
>>
> Nan's a bit like null pointer. It sounds rather specialised, but once
> you have it, you use it in all sorts of places.
I think you're using "specialized" in a different sense than I was. When
I said that a NaN indicates a special case, I was referring to the fact
that expressions which are permitted (or required, if __STDC_IEC_559__
is pre#defined by the implementation) to have a value of NaN can
generally do so only for special values of their operands: acos(2.0),
log(-1.0), pow(-1.0, 0.5), tgamma(-1.0), fmod(0.0, 0.0).