From: "nirinA raseliarison" <[EMAIL PROTECTED]>
>>> from test.test_random import gamma
. . .
there is a simple implementation in Python at: http://en.wikipedia.org/wiki/Lanczos_approximation with coefficients slightly different from those in test_random.py, one gets:
. . .
with the gamma from gcc under linux, which uses the MPFR library, the result is not really satisfying: using the code from numerical recipes chap 6:
. . .
and from the scipy package, which uses the cephes math library:
...
i'll check if an appropriate choice of of a set of coefficients or extending the number of coefficients can lead to a more accurate result.
Discussions of "my approximation is better/faster/etc than yours" can be interminable. Recommend you put together your favorite approximation in a recipe. The one in test.random is suffices well for its purpose. Raymond _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com