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