# Inf/Inf = NaN?

4 messages
Open this post in threaded view
|

## Inf/Inf = NaN?

 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?         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 [hidden email]         idiocy is the impulse function in the convolution of life
Open this post in threaded view
|

## Re: Inf/Inf = NaN?

 >>>>> 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 [hidden email] > 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 *     [hidden email] * * A-1040 Wien, Austria        * http://www.ci.tuwien.ac.at/~weingessel * ************************************************************************