Maxima/ECL combination not printing a leading zero
Subject: Maxima/ECL combination not printing a leading zero
From: Robert Dodier
Date: Fri, 6 Aug 2010 10:44:00 -0600
On Fri, Aug 6, 2010 at 3:04 AM, Raymond Toy <toy.raymond at gmail.com> wrote:
>> (format nil "~vf" 17 (/ 1d0 1.39239992382181823812d0))
>> ?=> ".7181844690534236"
> Nice example. ?It's not even specific to ecl. ?CMUCL and clisp print the
> same thing.
>
> The difference between ecl on Solaris/sparc and Solaris/x86 could very
> well be the floating-point units or the routines used to compute cl:asinh.
>
> (format nil "~vf" 17 (asinh 1d0))
>
> produces a leading 0 on Solaris with cmucl, but there's no leading zero
> on Solaris clisp. ?The number value of (asinh 1d0) is slightly different
> too.
I suspect the presence or absence of leading 0 is due to
differing significant digits, not a difference in the printing algorithm.
I don't really care about the leading 0, but on looking at this
again I'm inclined to try (again) to make the printed digits
conform to fpprintprec. (The number of printed digits is approximately
fpprintprec, but not exactly.)
Robert Dodier