Rational numbers

mensanator at aol.com mensanator at aol.com
Fri Feb 23 13:34:43 EST 2007


On Feb 23, 10:39 am, Martin Manns <mma... at gmx.de> wrote:
> On Fri, 23 Feb 2007 09:52:06 -0600
>
> Larry Bates <lba... at websafe.com> wrote:
> > I quick search of Google turned up:
>
> >http://books.google.com/books?id=1Shx_VXS6ioC&pg=PA625&lpg=PA625&dq=p...
> >http://calcrpnpy.sourceforge.net/clnum.html
> >http://gmpy.sourceforge.net/
>
> Sorry that I did not point these out initially.
>
> + clnum seems to be slower and for speed may be compiled to wrap gmp so
> that it is just an additional layer between python and gmp .
>
> + gmpy is looking pretty unmaintained (dead) to me (newest update of
> cvs 10 months ago).

Actually, gmpy is being maitained even if SourceForge isn't up to
date.

I got my gmpy 1.04a for Python 2.5 Windows binary from

<http://home.comcast.net/~casevh>

I haven't used the rationals all that much, but been very
happy with them when I have.


>
> + boost indeed is a quite nice C++ library. However, I fear that I
> would end up writing the python wrappers for operators (+ - * / min
> max cmp etc.) myself. I would like to avoid this since these operators
> should work correctly for any type (not just int and float) and I have
> little experience with verifying such generic code. The problems
> encountered in the mxNumber wrapper support this notion.
>
> Martin





More information about the Python-list mailing list