Re: Accuracy and Precision

*To*: mathgroup at smc.vnet.net*Subject*: [mg37059] Re: Accuracy and Precision*From*: pkosta2002 at yahoo.com (Peter Kosta)*Date*: Mon, 7 Oct 2002 05:26:18 -0400 (EDT)*References*: <anggkb$prg$1@smc.vnet.net> <anorfo$poq$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

pkosta2002 at yahoo.com (Peter Kosta) wrote in message news:<anorfo$poq$1 at smc.vnet.net>... > The more I play with the example the more depressing it gets. Start > with floating point numbers but explicitely arbitrary-precision ones. > > In[1]:= > a=77617.00000000000000000000000000000; > b=33095.00000000000000000000000000000; > > In[3]:= > \!\(333.7500000000000000000000000000000\ b\^6 + a\^2\ \((11\ a\^2\ > b\^2 - \ > b\^6 - 121\ b\^4 - 2)\) + 5.500000000000000000000000000000\ b\^8 + > a\/\(2\ > b\)\) > > Out[3]= > \!\(\(-4.78339168666055402578083604864320577443814`26.6715*^32\)\) > > In[4]:= > Accuracy[%] > > Out[4]= > -6 > > Due to the manual section 3.1.6: > > "When you do calculations with arbitrary-precision numbers, as > discussed in the previous section, Mathematica always keeps track of > the precision of your results, and gives only those digits which are > known to be correct, given the precision of your input. When you do > calculations with machine-precision numbers, however, Mathematica > always gives you a machineprecision result, whether or not all the > digits in the result can, in fact, be determined to be correct on the > basis of your input. " > > Because I started with arbitrary-precision numbers Mathematica should display > only those digits that are correct, that is none. I retract the above comment. I did not notice that was an error in the input. b=33095.00000000000000000000000000000 intstead of intended b=33096.00000000000000000000000000000 I am sorry for the mistake. PK > > > To relax a bit, set a new input cell to StandardForm and type > 77617.000000000000000000000000000000000 > > Convert it to InputForm. You get > 77616.999999999999999999999999999999999999999999952771`37.9031 > > Convert back to StandardForm > 77616.99999999999999999999999999999999999999999976637`37.9031 > > Again to InputForm > 77616.99999999999999999999999999999999999999999963735`37.9031 > > Back to StandardForm > 77616.99999999999999999999999999999999999999999951376`37.9031 > > See what you can get if you have enough patience or a small program. > > PK