Maxima, symbolic computation and fpprec



Dear Maxima users,

the following program is a simulation of the computation of Pi
according to Archimedes in the form of Christian Wolff.

Pi_Archimedes_Wolff(steps) :=
  block([r:1, se, su, ue, uu, i, n:3],
    se : sqrt(3),  /* initial values             */
    ue : 3 * se,   /* for the "triangle"-polygon */
    su : 2 * sqrt(3),
    uu : 3 * su,
    printf(true, "~2d ~10d ~13, 10h ~13, 10h ~43,
           40h ~%", 0, n, ue/2, uu/2, se*se),
    for i : 1 step 1 thru steps do
      (n  : n * 2,
       se : r*sqrt(2-2*sqrt(1-(se/(2*r))*(se/(2*r)))),
       ue : n * se,
       su : se / sqrt(1 - (se/(2*r)) * (se/(2*r)) ),
       uu : n * su,
       printf(true, "~2d ~10d ~13,10h ~13,10h ~43,
              40h ~%", i, n, ue/2, uu/2, se*se) ),
    (ue/2+uu/2)/2 );

All the computations are done symbolically - except for what is done
in the "printf" lines.  But whatever is done there - it should not
influence the value of the (local) variables.  If this were so, the
printed lines should be the same for different values of fpprec.  But
they are not.  For instance, running the program (with steps > 12) the
default value of fpprec results in a printout quite different from
running the program, for instance, with fpprec : 100.
I would be very grateful for an explanation of this phenomenon.

Thank you very much,
Jochen Ziegenbalg