Testing for NaN

Gabriel Dos Reis gdr@integrable-solutions.net
23 Apr 2003 15:26:18 +0200


George Russell <ger@tzi.de> writes:

| The standard trick would be:
| 
|    isNaN d = (d /= d)
| 
| This will not distinguish between quiet and signalling NaN's,

if "d" is a signalling NaN, the above may trap.  I.e, the only things one
can do with a signalling NaN are:
   (a) change its value; or
   (b) pass it around.

-- Gaby