bfloat; arbitrary precision floating point arithmetic; speed relative to GMP,gmpy



Bigfloats allow for much much larger exponents, as Ray says. 

The comparison would be to MPFR,  not GMP or gmpy. (in python?)

Some lisps use GMP already, but that is just for integers.

I have used MPFR from Allegro Common Lisp, and it is considerably faster, if
all your numbers are 3 or more words long.
MPFR is slower for small numbers, especially single-word fixnums.

There is also a package for qd  or quad double which extends the fraction
(4X longer than double),
But this has the restriction that you seem to expect on exponent.

The code for all this is posted on the internet, except you'd have to get
your own copy of Allegro.
Or modify the foreign-function interface to some other lisp.

RJF


> -----Original Message-----
> From: maxima-bounces at math.utexas.edu 
> [mailto:maxima-bounces at math.utexas.edu] On Behalf Of Raymond Toy
> Sent: Saturday, August 25, 2007 9:38 AM
> To: Bartlett, Charles S.
> Cc: maxima at math.utexas.edu
> Subject: Re: [Maxima] bfloat; arbitrary precision floating 
> point arithmetic; speed relative to GMP,gmpy
> 
> Bartlett, Charles S. wrote:
> > Please answer:
> >  
> > - the largest floating point (or big floating point) number that
> > Maxima can handle is ~ 1.797e308 - correct? bfloat only allows
> > changing the number of digits of precision, not increasing the
> > exponent beyond 308?
> That's the limit for IEEE double-float.  Maxima's bfloat is 
> only limited
> by the amount of memory you have for the Lisp implementation you are
> using.  1b10000 works fine for me.
> >
> >  
> > - any idea on the speed comparison between running equivalent
> > operations in Maxima vice using GMP or gmpy?
> I never measured it but I would guess it's slower.  Don't 
> know how much
> slower.  I think it really depends on how good the underlying bignum
> arithmetic is of the Lisp you're using.  Some use GMP for 
> that.  Others
> have their own implementation.
> 
> Ray
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>