Subject: Setting precision; [Was] A puzzling arithmetic
From: Richard Fateman
Date: Sun, 16 Nov 2003 10:34:23 -0800
This is a surprising result, since FPPREC affects the precision of
bigfloats, and you are not using bigfloats at all. The description
of FPPREC is quite misleading. Perhaps someone is also using FPPREC
for some other purpose, maybe for controlling formatted output.
In fact it seems that the answer is no different, and you are not
getting a rounded number. You are just printing it differently, as
you will see if you compute d8-251.8
or if you just do this..
fpprec:100;
d8;
and you see it printed again but as 251.79999..
If you want high precision answers, try fpprec:100; 1.0b0/3.0b0;
I believe the commercial macsyma changed the name of this variable,
and presumably fixed the documentation.
RJF
Jonathan wrote:
>Doing this gives the rounded output:
>
>(C6) FPPREC:12;
>
>(D6) 12
>(C7) FPPREC;
>
>(D7) 12
>(C8) 57.50+14.95+18.95+8.95+22.95+12.95+7.95+6.95+19.95+12.95+8.95+9.95+16.95
>+19.95+11.95
>;
>
>(D8) 251.8
>
>
>FPPREC sets the floating point precision.
>
>_______________________________________________
>Maxima mailing list
>Maxima@www.math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima
>
>