MathGroup Archive 2002

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

Search the Archive

Re: Re: Accuracy and Precision

  • To: mathgroup at smc.vnet.net
  • Subject: [mg37018] Re: [mg36982] Re: Accuracy and Precision
  • From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
  • Date: Sun, 6 Oct 2002 05:33:24 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On Saturday, October 5, 2002, at 09:33 AM, Peter Kosta wrote:

> You are entitled to your opinion. For my applications
> this behavior IS useless.
>

I agree that Mathematica is probably useless for you. This is however 
not because it is useless or useless for "your application", but 
because to use its full power you have to study it, understand it, and 
in particular, for numerical work, understand the model of arithmetic 
it uses. Lie with mathematics they are really no shortcuts that will 
lead you to its full power. In addition, since it is a computer 
program, it has certain conventions, which may not be the same as the 
conventions of other programs (they all have conventions) but which you 
have to accept to be able to use it. Now, once you have done that, you 
may still not like the way Mathematica does things and there are  
genuine experts in numerics who indeed do not like and are quite vocal 
about it. But they never say "it is useless", because by saying that 
you are either displaying your own ignorance or engaging in stupid and 
pointless abuse.

On a more serious level, there seem to be two basic approaches to 
numeric computation  relevant to this discussion. It seems to me 
(though I am no expert in this sort of thing) that there are three 
types of situations that one may encounter. Firstly, there is the vast 
majority of rather simple computations for which built-in machine 
floating point arithmetic , which carries no guarantee of precision at 
all is meant for. It clearly must be sufficient for the majority of 
purposes, since most general purpose and even  technical software 
available uses not other method. The reason of course is that it is by 
far the fastest way to do such computations (as well as being 
sufficient for most situations).

The second type of situation is when you actually know the precision of 
your input and would like the program to give you some idea about the 
precision of the output you might expect. This is the most likely 
situation in empirical science and is exactly what SetPrecision is 
meant for. Most reasonable people would agree that Mathematica works 
well in this situation.

There is finally one more situation, to which the only reasonable 
criticism that I have read in this thread appears to be directed at. 
That is the situation when you actually know your input exactly, but 
working with exact numbers is far too slow. So what you have to do is 
to replace your exact numbers with inexact ones padded with 0's. In 
Mathematica you have to take a guess at how much padding you will need, 
than use SetPrecision to pad the numbers, and then check the Precision 
of your answer. It may turn out that you did not get as much precision 
as you needed, in which case you have to use more zeros. Or it may be 
that you used more than enough, which mans that your computation could 
have been done faster. I learned from Leszek Sczaniecki that there is 
an approach due to Oliver  Aberth which lets you only specify the 
desired precision of your answer and the program itself will choose the 
correct padding for your input. It woudl ertainly be nice to have this 
ability, but I honestly think that it would be only of marginal 
advantage over making your own guess. It seems to me that the checking 
that the Aberth mthod must require will be time consuming and wiht a 
bit of practice one can probably get better results as far as speed is 
concerned using the Mathematica approach. But this is just pure 
speculation and certainly it woudl be nice if such a possibility 
existed.


Andrzej Kozlowski
Toyama International University
JAPAN
http://sigma.tuins.ac.jp/~andrzej/



  • Prev by Date: Re: Re: Accuracy and Precision
  • Next by Date: Re: Re: Accuracy and Precision
  • Previous by thread: Re: Re: Accuracy and Precision
  • Next by thread: Re: Re: Accuracy and Precision