X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f Message-ID: <3FF743FC.3000302@phekda.gotadsl.co.uk> Date: Sat, 03 Jan 2004 22:36:44 +0000 From: Richard Dawe User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031031 X-Accept-Language: en, de, fr MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: Values for HUGE and NAN References: <59 DOT 2747722 DOT 2d274337 AT aol DOT com> In-Reply-To: <59.2747722.2d274337@aol.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com 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