X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f Date: Tue, 17 Feb 2004 11:07:21 +0200 (EET) From: Esa A E Peuha Sender: peuha AT sirppi DOT helsinki DOT fi To: djgpp-workers AT delorie DOT com Subject: Re: C99 Functions Under Development and Checkout In-Reply-To: <40312BCC.1080507@cyberoptics.com> Message-ID: References: <40312BCC DOT 1080507 AT cyberoptics DOT com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 16 Feb 2004, Eric Rudd wrote: > Then came C99, which stipulated, for instance, that atan(+Inf,+Inf) = > pi/4. This is tantamount to saying that Inf/Inf = 1. I made public > objections to some of these things when C99 was out for review, but the > C99 committee neither changed the draft standard nor gave a significant > explanation of why it kept things as they were. Thus, one could as well > speak of "Blunders committed by IEEE 754 and C99". I understand your point of view, but I also think that floating-point numbers should not be thought of as real [pun intended] numbers; Inf, for example, doesn't represent just the literal infinity, but also all finite numbers that are far too large to fit into any floating-point type, so it does make some sense to say that Inf/Inf is equal to 1. > In practical terms, I suppose that none of this is very important, since > generally one attempts to avoid these exceptional arguments, precisely > because their effects are not consistent from system to system. The point of C99 (well, one of them) is precisely to make them consistent. I think we should comply with the standard. > There > is another reason for avoiding them: on the Pentium 4, the coprocessor > handles NaNs, etc. through an exception mechanism that is as much as 300 > times slower than normal execution. Well, keep the NaNs out of the coprocessor, then. It's easy enough to do, and apparently well worth it. -- Esa Peuha student of mathematics at the University of Helsinki http://www.helsinki.fi/~peuha/