special._precompute.gammainc_data

Compute gammainc and gammaincc for large arguments and parameters and save the values to data files for use in tests. We can’t just compare to mpmath’s gammainc in test_mpmath.TestSystematic because it would take too long.

Note that mpmath’s gammainc is computed using hypercomb, but since it doesn’t allow the user to increase the maximum number of terms used in the series it doesn’t converge for many arguments. To get around this we copy the mpmath implementation but use more terms.

This takes about 17 minutes to run on a 2.3 GHz Macbook Pro with 4GB ram.

Sources: [1] Fredrik Johansson and others. mpmath: a Python library for

arbitrary-precision floating-point arithmetic (version 0.19), December 2013. http://mpmath.org/.

Module Contents

Functions

gammainc(a,x,dps=50,maxterms=None) Compute gammainc exactly like mpmath does but allow for more
gammaincc(a,x,dps=50,maxterms=None) Compute gammaincc exactly like mpmath does but allow for more
main()
gammainc(a, x, dps=50, maxterms=None)

Compute gammainc exactly like mpmath does but allow for more summands in hypercomb. See

mpmath/functions/expintegrals.py#L134

in the mpmath github repository.

gammaincc(a, x, dps=50, maxterms=None)

Compute gammaincc exactly like mpmath does but allow for more terms in hypercomb. See

mpmath/functions/expintegrals.py#L187

in the mpmath github repository.

main()