[Ecls-list] [Maxima] Maxima/ECL combination not printing a leading zero
Dr. David Kirkby
david.kirkby at onetel.net
Fri Aug 6 15:16:15 UTC 2010
On 08/ 6/10 10:04 AM, Raymond Toy wrote:
> 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
It's worth noting however that the failure to print the leading zero is seen on
a common CPU (Intel Xeon), albient with a less common operating system (Solaris).
The strange thing, when Solaris is run on the SPARC processor, the output is
similar to Intel systems on AMD/Intel CPUs.
Small differences are to be expected when computing these things, especially on
SPARC processors, so I'm not concerned about the exact value of the last digit -
that's pretty irrelevant.
Dave
More information about the ecl-devel
mailing list