gamma approximation : what is module cmath and where is it located ?
tjreedy at udel.edu
Thu Jul 30 01:35:19 EDT 2009
pdlemper at earthlink.net wrote:
> The following numerical approximation for Euler's Gamma function
> is found in http://en.wikipedia.org/wiki/Lanczos_approximation
> from cmath import *
> But I can't figure out where it gets "cmath".
The Python documentation set has a module index. Really handy. I use it
all the time. cmath is under 'c'.
To answer some of your question:
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
ValueError: math domain error
Which to use depends on the behavior you want.
More information about the Python-list