Lanczos approximation: Difference between revisions

Content deleted Content added
m avoid stacked fractions in exponents
Line 63:
]
 
EPSILON = 1e-07
def drop_imag(z):
if abs(z.imag) <= EPSILON:
z = z.real
return z
 
def gamma(z):
z = complex(z)
if z.real < 0.5:
y = pi / (sin(pi*z) * gamma(1-z)) ## # Reflection formula
else:
z -= 1