Serious bug



Probably not a bug, at least not a bug in Maxima.


5.1 is a hardware floating point number. So is 3.2
Changed fpprec does not affect this arithmetic.
try bfloat(51/10) + bfloat(32/10).

By the time you type in 5.1, you have already lost the exactness you would
like.

The same thing should happen in GCL.  in fact (+ 5.1 3.2) comes out 
8.3000000000000007


Though in allegro common lisp, (+ 5.1 3.2) comes out as 8.3

This may have to do with decimal-to-binary and binary-to-decimal conversion
errors.

RJF


> -----Original Message-----
> From: maxima-bounces at math.utexas.edu 
> [mailto:maxima-bounces at math.utexas.edu] On Behalf Of sen1 at math.msu.edu
> Sent: Saturday, August 26, 2006 2:58 PM
> To: maxima at math.utexas.edu
> Subject: Serious bug
> 
> Hello,
>   I have not migrated to the "bug reporting list" yet.  If 
> this is more
>   appropriately put there, I'll be happy to do that.
> 
> In Win-XP xmaxima 5.9.3.99rc2
> 
> (%i1) 5.1 + 3.2;
> (%o1)		       8.300000000000001
> (%i2) fpprec: 30;
> (%o2)				      30
> (%i3) 5.1 + 3.2;
> (%o3)		       8.300000000000001
> 
> I checked this in v. 5.9.3 and the same problem occurs, 
> except that the last digit when done in hihg precision is a "?"
>   I did the same test in Linux and the problem is NOT there.  The
>   result is 8.3 as it should be.
> 
> I think others should try this to see if it occurs on their systems.
> 
> I tried this on two different Win-XP machines, so it is not 
> likely to ba a hardware problem.
> 
> I hope others try this to verify whether these are problems 
> with my installation of they exist everywhere.
> 
> -sen
> 
> 
>   
> --------------------------------------------------------------
> -------------
>   | Sheldon E. Newhouse            |    e-mail: 
> sen1 at math.msu.edu           |
>   | Mathematics Department         |       			
> 	   |
>   | Michigan State University      | telephone: 517-355-9684  
>               |
>   | E. Lansing, MI 48824-1027 USA  |       FAX: 517-432-1562  
>               |
>   
> --------------------------------------------------------------
> -------------
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>