Not A Number in IEEE Math
mac at ardent.com
mac at ardent.com
Tue Feb 20 08:38:44 AEST 1990
In article <44 at newave.UUCP> john at newave.UUCP (John A. Weeks III) writes:
> Xref: ardent comp.lang.c:24861 comp.sys.ibm.pc.programmer:25
^ why ardent?
> My understanding of the NaN (not a number) value in IEEE math is
> that once you get NaN, the operators +, -, /, *, and = are supposed
> to propagate the NaN value. Is my understanding correct?
>
> Well, while using MetaWare's HIGH-C compiler for the 80386 chip, I
> have discovered that:
>
> NaN / NaN = 1.0
>
> and
>
> 0.0 * NaN = 0.0.
>
> Is this correct behavior? I think HIGH-C is broken...
>
> -john-
This behaviour is not correct. Possibly the compiler has
folied you by presubstituting 1.0 for A/A and 0.0 for 0.0 * A at
compile time.
Or, perhaps your hardware traps into the OS for IEEE exceptions
and the OS's handling of source exceptions is broken.
Or, perhaps your hardware is not IEEE compliant....
--
Michael McNamara (St)ardent, Inc. mac at ardent.com
More information about the Comp.lang.c
mailing list