Complex bakeoff - example 1

Bob Knighten uunet!SSD.intel.com!knighten
Fri Oct 6 16:53:21 PDT 1995


Frank Farance writes:
  >
  >  . . . [text deleted] . . .
  >  For example, in
  > 
  >          T1 = R1/S1;
  > 
  >  the fact that finite/infinite == zero and finite/zero ==
  >  infinite is convenient for us *assuming we write code with
  >  full knowledge of how the exception handling is performed*.
  >  For example, the following code:
  > 
  >          T2 = R2/S2; /* choice 1 */
  >          T2 = R2/(1.0/(1.0/S2)); /* choice 2 */
  > 
  >  would produce the same result for varying values of S2
  >  (including zero and infinity).  Thus, we might believe that
  >  regardless of how we write the expression, the true
  >  ``mathematical'' result is returned.  However, this is, in
  >  general, not the case.  For example, if R2 and S2 are really
  >  the values:
  > 
  >          R2 = X*X;
  >          S2 = X;
  > 
  >  the true mathematical result of T2 should always be S2.
  >  Likewise, if R2 and S2 are the values:
  > 
  >          R2 = X;
  >          S2 = X*X;
  > 
  >  the true mathematical result of T2 should always be the
  >  reciprocal of R2.

I have no idea of what "true mathematical result" is supposed to mean when X=0
in any of these cases.  It is useful to extend the floating point number
system so that 0/0 is a NaN, but there is no way to extend the number system
so that 0/0 has a value that depends on the sequence of operations that was
used to compute the particular 0 in questions.

-- Bob

-- 
Robert L. Knighten	             | TriStar Program Manager
Intel Scalable Systems Division      |
CO3-202                              | knightenassd.intel.com
5200 N.E. Elam Young Parkway	     | (503) 677-4315
Hillsboro, OR 97124-6497	     | (503) 531-0603 [FAX]



More information about the Numeric-interest mailing list