[Python-3000] adding gamma and error functions to math module

Mark Dickinson dickinsm at gmail.com
Tue Jul 15 10:27:39 CEST 2008


On Tue, Jul 15, 2008 at 9:10 AM, nirinA raseliarison
<nirina at mail.blueline.mg> wrote:
> gammas and errors functions are available from the C standard
> library. it would be nice to have them in the math module.
> or is there any reason not to include them?

One reason is that they're probably not available on all platforms;
these functions
are part of the C99 standard, and not everyone has caught up with all the little
details of C99 yet.  In particular, I wouldn't be surprised to learn
that these functions
still weren't available on Windows.  We had this problem when adding the
inverse hyperbolic trig functions to Python 2.6.

I don't know whether it would be acceptable to expose these functions to Python
only on those platforms that have support for them in the C library.

Writing explicit code for these functions, for platforms whose libm doesn't
support them, would be a fairly major task.  Stealing code (in an appropriately
legal fashion) from somewhere else might work.

In any case, if you're interested in getting these in to 2.7/3.1 (it's too
late for 2.6/3.0) then I'd suggest opening a feature request at
bugs.python.org.  (And assign it to me, if you like.)

Mark


More information about the Python-3000 mailing list