about presicion

mensanator at aol.com mensanator at aol.com
Mon Aug 30 19:05:52 CEST 2004

Alex Martelli wrote:
> Mensanator <mensanator at aol.compost> wrote:
> > >Subject: Re: about presicion
> > >From: Peter Hansen peter at engcorp.com
> > >Date: 8/28/04 10:31 PM Central Daylight Time
> > >Message-id: <JN6dnW6HuNiU06zcRVn-pA at powergate.ca>
> > >
> > >Ali wrote:
> > >
> > >> The decimal module comes with python 2.4? I have 2.3, :(, what
do I do?
> > >
> > >The obvious answer is, well, obvious.  The real question is
> > >what's stopping you from upgrading?
> >
> > I just tried it and found out it's not compatible with gmpy.
> By "it" do you mean Decimal, or Python 2.4 alpha 2?

By "it", I meant gmpy 1.0 and Python 2.4. Trying to import the
module says it can't use the Python23.dll.

> I think gmpy should
> build happily with the latter,

I'm using the pre-built Windows binary distribution. I wouldn't
know how to re-build it. I assume that when Python 2.4 is final,
I newer compatible version of gmpy will become available.

> and interoperate sensibly with Decimal
> anyway -- as gmpy's author I'd be quite happy to fix gmpy if it's
> in either respect.

Were you aware that there is apparently a memory leak in the
gmpy.divm() function? Calling it several million time caused my
computer to run out of virtual memeory. Luckily, I was able to
work around it using the gmpy.invert() which didn't consume any
memory regardless of how many times it was called.

> > Of course, I wouldn't need gmpy to get big floats, but I
> > would then lose all the math functions like linear congruence
> > and modular inverse that my programs depend on.
> >
> > So I, for one, will have to wait for the rest of the world to
> > catch up to 2.4.
> 2.4 is not currently recommended for production work (that's why it's
> Alpha -- very good for an alpha, but it's still not a final release).

I don't do any production work. I'm just a hobbyist, so it's not a
big deal.

> But such support modules as gmpy need to get moving to support 2.4 in
> order to be ready for it well before final release...
> Alex

More information about the Python-list mailing list