Long-float variant giving more precision to numerical computations.
Subject: Long-float variant giving more precision to numerical computations.
From: Raymond Toy
Date: Thu, 14 Feb 2008 21:23:34 -0500
Douglas Crosher wrote:
> 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.
>
>
This is working now. I must have missed something by not removing all
the fasls and recompiling. (maxima.system is missing a ton of
dependencies.)
I have a couple more fixes for double-double.
Also, I don't think we should convert the slatec routines to use
long-float. The constants there are only accurate to double-float
because that's all that was used when they were generated (even if the
original source has way more digits---an artifact of f2cl). I think the
slatec routines should be compiled as normal double-float routines, and
the maxima interface to them should convert to/from flonum to
double-float as appropriate.
I have played around with lapack and quad-doubles, and I think they
could be converted to flonum type to get flonum precision. I think the
only issue is dlamch which computes some information about the
underlying floating-point number system. The quad-double version was
computing things like epsilon to be zero. :-) But we have lisp to tell
use most of the info, so a pure lisp version of dlamch would solve that
problem.
Ray