[Top][All Lists]

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

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

From: Camm Maguire
Subject: [Gcl-devel] Re: [Maxima] CLOS, Bigfloats, GMP
Date: 22 Nov 2004 12:40:40 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2


Richard Fateman <address@hidden> writes:

> Regarding CLOS or similar approaches.
> There was a tendency in programming macsyma originally to
> "traffic in body parts".  This might cause problems in making
> a clean approach to types.  Thus for the CRE form, we sometimes
> decapitated the form, and used only (cdr ..) of the form.
> For bigfloats, the equivalent is knowing that you have a bigfloat,
> and decapitating it, so you just have a list of exponent and fraction,
> with the precision set as a global variable, and the fact that you
> are dealing with a BIGFLOAT, implicit in the program that is being
> called.
> Maybe this causes no problems and insignificant inefficiencies
> compared to the time saved by not having to debug things.
> For what it is worth, there are major major advantages in speed, for
> numbers that are just a few words long, from using GMP instead of
> the home-grown bigfloats.  I think GCL already uses GMP, no? If so,
> using a few more interfaces may make this facility much faster.

Greetings!  GMP upstream has just broken out the multi-precision
floating point into a separate library, mpfr, which we do not use at
present.  It would be very straightforward to provide analogous mpf_
functions to the mpz_ functions currently available in GCL.  Asked
Paul Dietz some time ago about possible bigfloat uses in a lisp
implementation, and it seemed a little less than promising due to the
fixed precision nature of certain parts of the spec.  Please correct
me if wrong.

Take care,

> Raymond Toy wrote:
> >>>>>>"Mike" == Mike Thomas <address@hidden> writes:
> >     Mike> I accidentally deleted a couple of emails re CLOS and ANSI
> > GCL and Ray's
> >     Mike> proposal so can't reply directly to those.
> >     Mike> PCL is indeed part of ANSI GCL and can be brought into the
> > maxima package on
> >     Mike> the current stable release of Windows Maxima (after running 
> > "to_lisp()" )
> >     Mike> with "use-package" as follows:
> > I take it it mean PCL is available, but isn't really quite integrated
> > into ansi gcl yet.
> >     Mike> Errors about the class named "real" occur with Ray's code
> > as shown below.
> >     Mike> I'm not well versed (or chaptered, for that matter, if you'll 
> > forgive my
> > Does that mean that gcl doesn't know about the Lisp type REAL?
> > That's
> > supposed to be standard.  Or maybe my example code is wrong, and I
> > should have said cl:real instead.
> > I'd try to make this work, but I don't have a recent build of gcl.
> > Ray
> > _______________________________________________
> > Maxima mailing list
> > address@hidden
> > http://www.math.utexas.edu/mailman/listinfo/maxima
> _______________________________________________
> Maxima mailing list
> address@hidden
> http://www.math.utexas.edu/mailman/listinfo/maxima

Camm Maguire                                            address@hidden
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

reply via email to

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