Accuracy and error analysis (was Re: [Maxima] primes)



--- Albert Reiner  wrote:
> [C Y , Fri, 13 May 2005 13:20:27 -0700 (PDT)]:
> > 1.10 and 1.1 imply different things, in such a case.
> 
> When the distinction matters, people usually state the uncertainty
> explicitly, e.g., 1.100(5) vs. 1.10(5).  You are then also not
> limited to the artifacts of decimal notation.

Right. 

> I don't think that is desirable: this means that any input would be
> checked for whether there is something uncertain in it, and the error
> analysis would start to creep into the system as it did in Mma.  Not
> good.  Make the user ask for error analysis explicitly:
> 
>     with_error_analysis([a : ..., b : ... ], a + b);
> 
> This would also make it easier to switch from, say, naive
> significance arithmetic to something more sophisticated.  

Good point.

> And it would ensure that
> those who don't want this functionality are not at all.
> 
> With a full set of pre-processing / post-processing hooks analogous
> to Mma's $PreRead, $Pre, $PrePrint, $Post, one can then easily
arrange
> for with_error_analysis() to be wrapped around every expression if
> this is desired.

Very good point.  OK, provided we actually go ahead and impliment those
mechanisms, I agree.  I needed it for units, and you have just proposed
a second case where needing those hooks is possible or even likely :-).

> If experience with Mma is any indication, users often want to do
> things where speed is an issue.
> 
> Recomputing something with higher working precision in order to reach
> some desired accuracy is apparently hard to get right, as Mma shows.

True.  From the speed point of view though, I'm less worried since
there are different levels to choose from.

> Furthermore, that strategy is not only costly but also impacts the
> user in that she has to be even more careful in defining her
> functions as soon as side effects are involved.

But isn't this a consequence of the problem we are trying to solve? 
Yes it is costly, and yes care might be needed, but if you care about
significance you HAVE to pay those costs, if you want a reliable
answer.  I'm afraid I don't understand the necessity of extra care in
defining functions - if Maxima doesn't hit its numerical accuracy
limits there is no issue, and if it does hit them it's up to Maxima to
either introduce the extra uncertainty term or go for higher precision,
since only Maxima can know when its limits have been reached.  Of
course it would only make those decisions in cases where the user has
indicated it matters.

CY

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com