Maxima/ECL combination not printing a leading zero
Subject: Maxima/ECL combination not printing a leading zero
From: Raymond Toy
Date: Fri, 06 Aug 2010 05:04:52 -0400
On 8/6/10 1:59 AM, Robert Dodier wrote:
> On 8/5/10, Dr. David Kirkby <david.kirkby at onetel.net> wrote:
>
>> (%i1) asinh(1.0);
>> (%o1) .8813735870195429
> Appears to be a consequence of the way ECL formats
> floating point numbers. I can produce an example on Linux
> so it's not specific to Solaris. e.g.
>
> (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.
Ray