Beispiel #1
0
def gamma(z, cof=_gammacoeff, g=7):
    z -= 1.0
    # Next line fails when not compiled with --operator-funcs
    #s = msum([cof[0]] + [cof[i] / (z+i) for i in range(1,len(cof))])
    v1 = [cof[0]]
    v2 = [cof[i] / (z + i) for i in range(1, len(cof))]
    v1 = v1.__add__(v2)
    s = msum(v1)
    z += 0.5
    return (z + g)**z / exp(z + g) * sqrt(2.0 * pi) * s
Beispiel #2
0
def gamma(z, cof=_gammacoeff, g=7):
    z -= 1.0
    # Next line fails when not compiled with --operator-funcs
    #s = msum([cof[0]] + [cof[i] / (z+i) for i in range(1,len(cof))])
    v1 = [cof[0]]
    v2 = [cof[i] / (z+i) for i in range(1,len(cof))]
    v1 = v1.__add__(v2)
    s = msum(v1)
    z += 0.5
    return (z+g)**z / exp(z+g) * sqrt(2.0*pi) * s
Beispiel #3
0
def gamma(z, cof=_gammacoeff, g=7):
    z -= 1.0
    s = msum([cof[0]] + [cof[i] / (z+i) for i in range(1,len(cof))])
    z += 0.5
    return (z+g)**z / exp(z+g) * sqrt(2.0*pi) * s
def gamma(z, cof=_gammacoeff, g=7):
    z -= 1.0
    s = msum([cof[0]] + [cof[i] / (z + i) for i in range(1, len(cof))])
    z += 0.5
    return (z + g)**z / exp(z + g) * sqrt(2.0 * pi) * s