delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2004/01/03/17:24:51

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 <rich AT phekda DOT gotadsl DOT co DOT uk>
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>
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019