def Gamma(x):
    '''return gamma function of x
    raise ValueError  if x is negative integer'''
    x = float(x)
    if x == 0.0:
        return inf
    s = 1.0
    if (x<0):
        s = cos(pi*floor(x))
    return s*exp(Lgamma(x))
return gamma function of x
    raise ValueError  if x is negative integer
recipes/Python/576393_gamma_functions/recipe-576393.py