[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inf/Inf = NaN?
From: |
Andreas Weingessel |
Subject: |
Re: Inf/Inf = NaN? |
Date: |
Thu, 17 Apr 1997 09:15:01 +0200 |
>>>>> On Wed, 16 Apr 1997 22:42:53 -0700 (PDT),
>>>>> John Utz wrote:
> Hello everybody;
> On my fake pentium-100 running FreeBSD-2.2-GAMMA and octave-2.0.5 compiled
> with gcc-2.7.2 i get the above result ( Inf/Inf = NaN ). Shouldn't this
> equal 1?
No, Inf/Inf = NaN is correct. The reason is that, simply speaking,
Infinity does not necessarily equal Infinity. For example, 2 times
Infinity is still Infinity, as well as 10*Inf=Inf, so I could also
argue that Inf/Inf should be 2 or 10 or ... . Infinity just can not be
regarded as a "large" real number.
Andreas
> I was thinking of hacking if(a==Inf)&&(b==Inf) result = 1 into my
> code, but this is not how i like to work.
> note, the specific operation is (Inf-foo)/(Inf+foo) where foo is a real
> positive int. This should be equal to 1, but...does the fact that i am
> performing operations on Inf cause the math to "throw up it's hands and
> surrender", so to speak?
> tnx!
> john
> *******************************************************************************
> John Utz address@hidden
> idiocy is the impulse function in the convolution of life
************************************************************************
* Andreas Weingessel *
************************************************************************
* Institut für Statistik * Tel: (+43 1) 58801 4541 *
* Technische Universität Wien * Fax: (+43 1) 504 14 98 *
* Wiedner Hauptstr. 8-10/1071 * address@hidden *
* A-1040 Wien, Austria * http://www.ci.tuwien.ac.at/~weingessel *
************************************************************************