Re: Re: Accuracy and Precision
- To: mathgroup at smc.vnet.net
- Subject: [mg37071] Re: [mg37058] Re: Accuracy and Precision
- From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
- Date: Tue, 8 Oct 2002 07:17:30 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I did not request any accuracy for f. I set the accuracy of the
numerical components of the expression f. You cannot "request" the
accuracy of the result of your computation in Mathematica, you can
only set the accuracy of the input and later check what accuracy of the
output results form it. In my last message on this topic I tried to
explain this in the plainest and simplest way I could think of. There
is nothing more left for me to say. I feel like Sisyphus but unlike him
I can at least give up!
Andrzej Kozlowski
On Monday, October 7, 2002, at 06:26 PM, Peter Kosta wrote:
> 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/
>
>
>
Andrzej Kozlowski
Yokohama, Japan
http://www.mimuw.edu.pl/~akoz/
http://platon.c.u-tokyo.ac.jp/andrzej/