[Maxima] roundoff errors
fateman at cs.berkeley.edu
Thu Mar 12 07:02:35 CDT 2009
The numbers are probably printed with too many digits. The numbers that
are printed are, I suspect, ALSO
not exact representable values, so it is pointless to print those
Decimal numbers should probably be
rounded in the formatted printing so as to avoid these questions.
How much is lost? something between 0 and 1/2 unit in last place, I
think. Perhaps this is just a GCL bugl.
Robert Dodier wrote:
> On 3/11/09, Raymond Toy <toy.raymond at gmail.com> wrote:
>> 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.
> Or maybe bigfloats -- for the examples shown, the rounding behavior
> might be less surprising.
> 325.65b0 + 471.67b0; => 7.9732b2
> 17.91b0 + 34.77b0; => 5.268b1
> Robert Dodier
> Maxima mailing list
> Maxima at math.utexas.edu
More information about the Maxima