Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

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 machine­precision 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


  • Prev by Date: Missing Imaginary font for the Web
  • Next by Date: OT:RE: Mathematica stole my X so I had to kill it
  • Previous by thread: Re: Re: Accuracy and Precision
  • Next by thread: Re: Re: Accuracy and Precision