[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Nick Craig-Wood wrote: > > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > I'm using GMPY (see code). > > [snip] > > > > If you are using gmpy you might as well do it like this..... > > > > gmpy.pi() uses the Brent-Salamin Arithmetic-Geometric Mean formula > > for > > pi IIRC. This converges quadratically, and it will calculate you a > > million places without breaking a sweat. > > It would be nice if that were documented. What do I have to do, go get > the documentation for the original GMP to find out what else is in GMPY > that they didn't include in the doc file?
"pydoc gmpy" works for me. Not sure how you use pydoc on windows, but you can do this... >>> import gmpy >>> help(gmpy) Help on module gmpy: NAME gmpy FILE /usr/lib/python2.3/site-packages/gmpy.so [snip] Help on built-in function pi: pi(...) pi(n): returns pi with n bits of precision in an mpf object [snip] The original gmp documentation is sensible also, since gmpy is really just a thin wrapper to it. There is also the gmp source code too. -- Nick Craig-Wood <[EMAIL PROTECTED]> -- http://www.craig-wood.com/nick -- http://mail.python.org/mailman/listinfo/python-list