[Maxima] roundoff errors
Raymond Toy
toy.raymond at gmail.com
Wed Mar 11 19:52:10 CDT 2009
Uwe Weber wrote:
> Hello,
>
> I recently abused Maxima 5.16.3 as a pocket calculator and noticed that
> it produced strange roundoff errors in simple floating point
> multiplications:
>
> wxMaxima 0.7.6 http://wxmaxima.sourceforge.net
> Maxima 5.16.3 http://maxima.sourceforge.net
> Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL)
>
> (%i1) 325.65+471.67;
> (%o1) 797.3199999999999
>
> (%i2) 17.91+34.77;
> (%o2) 52.68000000000001
>
>
Expected behavior with floating point numbers. The numbers you give do
not have floating point values so they are rounded to the nearest
representable value. Use rationals if you want exact answers.
Ray
More information about the Maxima
mailing list