[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: [Maxima] CLOS, Bigfloats, GMP

From: Richard Fateman
Subject: [Gcl-devel] Re: [Maxima] CLOS, Bigfloats, GMP
Date: Mon, 22 Nov 2004 10:45:13 -0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)

I am by no means an expert on the GMP bigfloats. I looked
briefly at the MPFR page, and I think I also found the
relevant GCL-devel comment by Paul Dietz.

The major issue in my mind is that memory allocation
must be coordinated with the lisp GC.

What I mean about the GC is that
we have to be careful that when we do something like
(setf A (make-a-new-bigfloat-externally  initial-value))

and then
(setf A (bigfloat-plus A 1))

that the old value of A gets properly treated wrt lisp and gmp/mpfr.
This presumably has been solved in using GMP big integers.
(I had to work to get this to fit with Allegro CL strictly as
a user-added foreign-function data type, but it was possible.)

The things that Paul mentions don't bother
me. Like "what is epsilon"  the smallest non-zero bigfloat?
For bigfloats, epsilon is a function of the precision. If you
don't have a specific precision in mind, the question doesn't make
a lot of sense. Since the precision will presumably always have
a value, by default if not by setting it, it's no problem.  Oh, and if
you rebind the precision, you might also wish to re-bind epsilon.
In maxima I think we re-bind bigfloat-%pi and bigfloat-%e at such
times, anyway.

I don't know about max-float etc; in maxima now, I think the exponents
are (unbounded) integer bignums. So that question doesn't make sense,
and any algorithm depending on the question making sense should be

I suspect the mpfr software doesn't deal with how to
combine different precisions, but even if it did, it is not
clear that it would suit the maxima context.

So I don't see any obvious barrier.  Though the notes on the GMP page
about bugs continue to make me a little nervous. Bugs in subtraction?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]