Long-float variant giving more precision to numerical computations.
Subject: Long-float variant giving more precision to numerical computations.
From: Raymond Toy (RT/EUS)
Date: Wed, 06 Feb 2008 09:35:32 -0500
R Fateman wrote:
>
> 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.
The implementation is at http://common-lisp.net/project/oct.
>
> 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
I haven't forgotten about it but I've been distracted a bit. :-(
>
> 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
> -->quad too.
I did a very simple proof of concept. I took some of the BLAS routines
that were converted to Lisp via f2cl. Then I ran a really hacky program
to read in the Lisp code and convert all references of double-float to
qd-real. A quick test showed that I did get quad-double results.
Unfortunately, I also got distracted so I never went any farther. I
would like to at least try a Gaussian elimination or eigenvalue routine
to see if that will work.
With some more work. I think it would be possible to provide a bfloat
implementation of the LAPACK routines that maxima already has. I think
all that's need would be some CLOS wrappers to call bfloat routines as
needed. That would be pretty cool.
Ray