www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/02/08/02:17:49

Date: Wed, 8 Feb 1995 02:59:47 -0400 (AST)
From: Bill Davidson <bdavidson AT ra DOT isisnet DOT com>
Subject: Re: How to use Inf and NaN?
To: Stephen Turnbull <turnbull AT shako DOT sk DOT tsukuba DOT ac DOT jp>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu


On Tue, 7 Feb 1995, Stephen Turnbull wrote:

> I think that this has been discussed on the list.  Try searching the
> archives (see the URL below if you don't want to download the 8MB
> monster from Clarkson).

I would love to, but I have a dial-up terminal account with my service 
provider, and they run the Lynx WWW browser (is that the correct term) 
and it seems to be one-way.  That is, I tried to search your archives but 
Lynx seems not to want to send input from me to your server.  Also, I am 
limited to 2MB disk space on their Sun, so downloading 8MB (and then 
transferring it with zmodem!) is out of the question.  Maybe I just have 
to learn more about using Lynx?  Or maybe I need a proper SLIP account, 
bu that seems to mean windoze...

> Sure, it's dangerous, but what choice does he
> have if he wants efficient code (ie, having the FPU trap it)?

Surely the point here is to _not_ have the FPU trap an exception, so that 
Nan or +-Inf can stay on the FPU stack and be returned (but then how do 
you handle a NaN value, surely printf() won't understand it?) without 
raising an exception.

> I believe that affine means that there are plus and minus infinity;
> projective (like complex) only has one infinity.  (That's what it
> means in math, IEEE definitions may be something else again.)  So this
> is not going to return NaN.

My math never got that far, although I did do some set theory (or it did 
me...).  I always assume affine meant something like "not finite" and 
projective meant something like "close as I can come".  But as I said, I 
never knew what those terms meant.  Anyway, the fellow who asked wanted 
to get Inf or -Inf as answers, not just NaN.
Thanks for the info.  I keep trying to learn more about the '87, it 
possesses some very powerful instructions and is far more configurable 
than most people realize, but it must be one of the least documented 
processors around!
Bill Davidson
bdavidson AT ra DOT isisnet DOT com

- Raw text -


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