Philip Taylor wrote:
> Ron Blaschke wrote on 01/08/2006 08:17:
>>
>> I am wondering if this NaN != NaN property could be used for the isnan
>> and finite tests, like so:
[snip]

 >> Is this not portable enough?  Is it better to look at the bits directly?
[great stuff snipped]

> It seems like the only way to stay safe is to work around the optimiser,
> presumably by testing bits or using library functions or writing
> assembly code (e.g. with 'fxam' on x86).

Thanks a lot for sharing your deep insights, Philip.  Judging from
Bill's and your input it's probably best to look at the bits directly.

Too bad, the two lines solution would have been really tempting.  Resist
the dark side of code one must. ;-)

Thanks,
Ron

Reply via email to