Maxima Digest, Vol 9, Issue 38



Maybe we can promote

RelativeErrorBound(a,b,eps):= if equal(a,b) then true else
is(abs((a-b)/max(a,b))< eps);
AbsoluteErrorBound(a,b,eps):= is (abs(a-b)<eps);

Or some such constructions. 

> -----Original Message-----
> From: maxima-bounces at math.utexas.edu 
> [mailto:maxima-bounces at math.utexas.edu] On Behalf Of Keith Weinman
> Sent: Friday, April 13, 2007 7:12 AM
> To: maxima at math.utexas.edu
> Subject: Re: [Maxima] Maxima Digest, Vol 9, Issue 38
> 
> Dear all,
> 
> Since finite precision numerics are inherent in any computer 
> representation of a decimal number I think that there are some issues 
> that are required to be understood by a user. To this end 
> perhaps there 
> should be a small section in the user guide files dedicated to this 
> topic (following suggestion of R.Fateman - apologies if my memory is 
> faulty). Since I have to do something like this for the code 
> I work on, 
> I will be happy to give a latex file which others can then modify  if 
> they feels so inclined.
> 
> Maybe some simple addiitons that can help when people do 
> floating point 
> comparisons  such as  (a == b)   are by rewriting them as 
> 
> if (fabs(a-b) < epsilon) ?  true : false;
> 
> where epsilon is machine epsilon. 
> 
> 
> This expression  is more meaningful in the world of finite precision 
> numerics. Then of course there are additional steps, such as 
> reformulation of algorithms to avoid catestrophic 
> cancellation.   This 
> may become more important if MAXIMA really is to be used as a 
> numerical 
> analysis package as well, however most commercial numerical packages 
> probably dont worry about these issues too deeply because of run time 
> costs if all possible sources of fp error are caught.   
> 
> best regards
> Keith
>  
> 
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>