Mail Archives: djgpp-workers/2004/01/03/17:24:51
Hello.
Kbwms AT aol DOT com wrote:
> C99 specifies values for HUGE_VAL, HUGE_VALF and HUGE_VALL for types
> double, float, and long double but only one for NAN. Why aren't values
> for the three types specified similarly for NAN?
I don't know. I've wondered about that too.
Perhaps it's because HUGE_VAL* are used to indicate an FP function
failing and you compare directly against a constant, whereas NaNs can be
tested for using isnan(). HUGE_VAL* are discrete values, whereas there
are many NaNs. Just guessing.
Bye, Rich =]
--
Richard Dawe [ http://homepages.nildram.co.uk/~phekda/richdawe/ ]
"You can't evaluate a man by logic alone."
-- McCoy, "I, Mudd", Star Trek
- Raw text -