Long-float variant giving more precision to numerical computations.
Subject: Long-float variant giving more precision to numerical computations.
From: Douglas Crosher
Date: Fri, 15 Feb 2008 12:11:56 +1100
Robert Dodier wrote:
> On Thu, Feb 14, 2008 at 8:39 AM, Raymond Toy (RT/EUS)
> <raymond.toy at ericsson.com> wrote:
>
>> A quick fix for that, and everything compiles. I have to say it is
>> rather nice to see all those extra digits. There are a few issues
>> though. Printing large floats doesn't print out all the digits.
>
> Yeah. There is a literal constant 16 in EXPLODEN.
> I guess that should become a function of the float size,
> s.t. like ceiling((mantissa #bits)/(log(10)/log(2))).
> Or maybe there is a way to specify a format directive
> which just means "print all available digits".
A new constant was added, see float.lisp
(defmvar $maxfpprintprec (ceiling (log (expt 2 (float-digits 1.0)) 10.0))
"The maximum number of significant digits printed for floats.")
This is used as the default value for $fpprec, and in 'exploden as the default
when $fpprintprec is zero. This is 16, as before, for double-floats, and for
the CMU CL double-double floats this is currently 32.
Regards
Douglas Crosher