Re: Simplify 0/0 to 1?

*To*: mathgroup at smc.vnet.net*Subject*: [mg77622] Re: Simplify 0/0 to 1?*From*: "Dana DeLouis" <dana.del at gmail.com>*Date*: Thu, 14 Jun 2007 05:18:10 -0400 (EDT)

Interesting subject. I got interested in a related subject. When the numerator has a machine precision number, I was under the impression the whole equation is evaluated at Machine precision (Documentation). This equation returns 1 in a spreadsheet like Excel because it works at machine precision only. However, this returns "ComplexInfinity." (Note the use of 1.0). The denominator appears to be evaluated at full precision. (small arbit. Number)/0 (1. - Cos[2]^2 - Sin[2]^2)/(1 - Cos[2]^2 - Sin[2]^2) Power::infy:Infinite expression 1/0. encountered. >> ComplexInfinity However, this appears to return 0 since the numerator is exactly zero. 0 / (small arbit. Number) (1 - Cos[2]^2 - Sin[2]^2)/(1. - Cos[2]^2 - Sin[2]^2) 0. I was expecting a value of 1.0 if just one of the numbers was a machine precision number no matter where it was located. I realize that this would return 1 only if the equation is complex enough to generate a very small value other than 0 at machine precision. Which apparently it does.. InputForm[1. - Cos[2]^2 - Sin[2]^2] -1.1102230246251565*^-16 Thanks. - - - Dana (Mathematica 6.0, and Help files 5.2)