[Maxima] Long-float variant giving more precision to numerical computations.
fateman at cs.berkeley.edu
Wed Feb 6 08:24:25 CST 2008
Adding extra precision algorithms (good for 80 bits) when the hardware
only does 64 bits might slow down the programs for those less-precise
systems. (For example, 80-bit sin/cos/log/exp/bessel/...). So maybe
the libraries should be kept separate.
There are software versions of quad (that is, 4 doubles) that are
implemented in pretty much standard CL -- in CMU-CL, this is done by
doubling the (already built-in) double-double. In other lisps (I tried
Allegro), it can be done by mimicking the quad arithmetic available for
C, or just calling the C library.
Deciding how to integrate this into Maxima has been a puzzle. Ray Toy
and I were messing with this recently, but I think we both got tired of
it. One point is that we have versions of sin/cos/ etc for quad. As
well as some more substantial programs like root-finding, various
quadrature programs, and FFT.
The code is open, and some papers describing it are online as well.
I think http://www.cs.berkeley.edu/~fateman/generic see files quad*
Integrating all this with the fortran code would not be automatic, for
sure. But I think Ray has made progress on that, too.
After all, once you have done fortran --> lisp, why not do double
Douglas Crosher wrote:
> A variant of Maxima 5.14.0cvs is available that replaces the use of the Common Lisp
> 'double-float type with the 'long-float type for Maxima floating point numbers.
> This change gives more precision and range to some numerical calculations which
> do not currently support the Maxima bfloat type, such as the Fortran based code.
> The changes have been tested on the Scieneer CL and CLISP. The Scieneer CL x86
> and AMD64 ports support extended precision 80-bit floating point numbers for the
> 'long-float type, and CLISP supports a much more precise 'long-float type. The
> change should be neutral on CL implementations for with the 'long-float type is
> equivalent for the 'double-float type. I understand that CMUCL now has a
> double-double-float type and with some more work it may be possible to support this
> I needed more accuracy from numerical calculations and this was the quickest path
> and it extends the number of computations that Maxima can perform to high precision.
> However there are still a good number numerical approximations in Maxima that
> have not been improved and still give only 'double-float level accuracy.
> It is not clear to me that this is a change that should be integrated into the
> main source now, but the modified source code can be downloaded from:
> Douglas Crosher
> Maxima mailing list
> Maxima at math.utexas.edu
More information about the Maxima