Gmpy

Ernie eadorio at yahoo.com
Fri Aug 8 00:39:33 EDT 2003


Alex Martelli <aleax at aleax.it> wrote in message news:<v8AYa.29893$an6.1046141 at news1.tin.it>...
> Carl Banks wrote:
> 
> > Jean-Pierre Andreaux wrote:
> >> Gmpy module was a wrapper of the GNU MP library. It seems that no
> >> evolution is done on this module since 2001. Indeed, Gmpy is not
> >> supported in Python 2.2 nor 2.3.
> >> 
> >> My question is the following: what is the better replacement solution
> >> for manipulating long numbers. I want to do long numbers
> >> exponentiations. Thanks in advance for your answers.
> > 
> > 
> > An alternative is egenix mxNumber package, still in beta stage.
> > 
> > http://www.egenix.com/files/python/mxNumber.html
> > 
> > I couldn't use gmpy because I needed floating point, and mxNumber also
> > wraps the floating point functionality.  It seemed to work ok.
> 
> gmpy also wraps the floating-point functionality of GMP:
> 
> >>> print gmpy.mpf(7,99)/3
> 2.333333333333333333333333333333333333333

I am using the XR package from
http://more.btexact.com/people/briggsk2/XR-2.0.tgz and want to try out
the gmpy for comparison. However, trying to install
gmpy-sources-09a21.zip, results in an error:

running install
running build
running build_ext
building 'gmpy' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -fPIC -I/usr/local/include/python2.3 -c gmpy.c -o
build/temp.linux-i686-2.3/gmpy.o
In file included from /usr/local/include/python2.3/Python.h:8,
                 from gmpy.c:101:
/usr/local/include/python2.3/pyconfig.h:844:1: warning:
"_POSIX_C_SOURCE" redefined
In file included from /usr/include/assert.h:36,
                 from gmpy.c:96:
/usr/include/features.h:171:1: warning: this is the location of the
previous definition
gmpy.c: In function `Pygmpy_rand':
gmpy.c:5053: structure has no member named `seed'
error: command 'gcc' failed with exit status 1

Ernie




More information about the Python-list mailing list