def _igamc(a, x):
<EOL>ax = math.exp(a * math.log(x) - x - math.lgamma(a))<EOL>y = <NUM_LIT:1.0> - a<EOL>z = x + y + <NUM_LIT:1.0><EOL>c = <NUM_LIT:0.0><EOL>pkm2 = <NUM_LIT:1.0><EOL>qkm2 = x<EOL>pkm1 = x + <NUM_LIT:1.0><EOL>qkm1 = z * x<EOL>ans = pkm1 / qkm1<EOL>while True:<EOL><INDENT>c += <NUM_LIT:1.0><EOL>y += <NUM_LIT:1.0><EOL>z += <NUM_LIT><EOL>yc = y * c<EOL>pk = pkm1 * z - pkm2 * yc<EOL>qk = qkm1 * z - qkm2 * yc<EOL>if qk != <NUM_LIT:0>:<EOL><INDENT>r = pk/qk<EOL>t = abs((ans - r) / r)<EOL>ans = r<EOL><DEDENT>else:<EOL><INDENT>t = <NUM_LIT:1.0>;<EOL><DEDENT>pkm2 = pkm1<EOL>pkm1 = pk<EOL>qkm2 = qkm1<EOL>qkm1 = qk<EOL>if abs(pk) > BIG:<EOL><INDENT>pkm2 *= BIGINV;<EOL>pkm1 *= BIGINV;<EOL>qkm2 *= BIGINV;<EOL>qkm1 *= BIGINV;<EOL><DEDENT>if t <= MACHEP:<EOL><INDENT>return ans * ax<EOL><DEDENT><DEDENT>
Complemented incomplete Gamma integral.

    SYNOPSIS:

    double a, x, y, igamc();

    y = igamc( a, x );

    DESCRIPTION:

    The function is defined by::

        igamc(a,x)   =   1 - igam(a,x)

                                inf.
                                   -
                          1       | |  -t  a-1
                    =   -----     |   e   t   dt.
                         -      | |
                        | (a)    -
                                    x

    In this implementation both arguments must be positive.
    The integral is evaluated by either a power series or
    continued fraction expansion, depending on the relative
    values of a and x.