Re: Accuracy and Precision
- To: mathgroup at smc.vnet.net
- Subject: [mg37058] Re: Accuracy and Precision
- From: pkosta2002 at yahoo.com (Peter Kosta)
- Date: Mon, 7 Oct 2002 05:26:16 -0400 (EDT)
- References: <anp065$qtb$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Andrzej Kozlowski <andrzej at tuins.ac.jp> wrote in message news:<anp065$qtb$1 at smc.vnet.net>... > On Friday, October 4, 2002, at 06:01 PM, DrBob wrote: > >[...] > > I would say this is correct and show that SetPrecision is very useful > indeed. It tells you (what of course you ought to already know in this > case anyway) that machine precision will not give you a realiable > answer in this case. If you know your numbers with a great deal of > accuracy you can get an accurate answer: > > In[24]:= > f = SetAccuracy[333.75*b^6 + a^2*(11*a^2*b^2 - b^6 - > 121*b^4 - 2) + 5.5*b^8 + a/(2*b), 100]; > a=SetPrecision[77617.,100]; b = SetPrecision[33096.,100]; > > > In[26]:= > {f, Precision[f]} > > Out[26]= > {-0.82739605994682136814116509547981629199903311578438481991\ > 781484167246798617832`61.2597, 61} > Congratulations! You just requested accuracy of 100 for f and got 61 ( to convince yourself add Accuracy[f] to In[26]). If In[24] one replaces SetAccuracy by SetPrecision the result is similar. PK > Again you can be pretty sure that you got an accurate answer, provided > of course your original setting of precision was valid. > > Honestly, to say that SetPrecision and SetAccuaracy are useless is one > of the silliest thing I have read on this list in years. > > > > > Andrzej Kozlowski > Yokohama, Japan > http://www.mimuw.edu.pl/~akoz/ > http://platon.c.u-tokyo.ac.jp/andrzej/
- Follow-Ups:
- Re: Re: Accuracy and Precision
- From: Daniel Lichtblau <danl@wolfram.com>
- Re: Re: Accuracy and Precision