Maxima/ECL combination not printing a leading zero



On Sun, Aug 8, 2010 at 1:31 PM, Raymond Toy <toy.raymond at gmail.com> wrote:

> Why is printing a non-significant leading zero more important than
> printing the number correctly to the last digit? ?I'd much rather see
> the last correct digit than the irrelevant leading 0.

We can have both. An embarrassment of riches.

Another artifact of the current printing scheme is that
it's possible to have a final trailing 0 chopped off too,
e.g. fpprintprec : 6; 123456.0; => 123456.
That's a bug (not just unpleasing) because 123456. is
an integer in base 10 (whatever the value of ibase).

>> As a second point, failing to print the leading zero is an
>> inconstancy, as sometimes it's printed.

> Yes, it is inconsistent on the assumption that it should be printed.
> It's not inconsistent if the criterion is to print out as many digits as
> needed to represent the number as accurately as possible given the
> constraint that the result takes 17 characters.

I dunno. fpprintprec = width of output field is an unmathematical
definition ... fpprintprec = maximum number of significant digits
makes more sense to me. Also, if fpprintprec is set to any nonzero
value, it doesn't make any sense to me to print additional
significant digits. (It makes sense to let fpprintprec = 0 imply
printing all significant digits.)

FWIW

Robert Dodier