[SciPy-user] ellipk() with negative arguments?

Iordan Hristov hristov@ucalgary...
Sun Mar 29 18:14:34 CDT 2009


Hello,

I'm implementing a Mathematica equation which has EllipticK[x], x<0.  
It seems the domain of  ellipk() is between 0 and 1 and anything  
outside gives nan. For example:

Scipy: 			ellipk(.1) -> 1.6124413487202192
Mathematica: 	N[EllipticK[.1]] -> 1.61244

Scipy: 			ellipk(-1) -> nan
Mathematica: 	N[EllipticK[-1]] -> 1.31103

Scipy: 			ellipk(3) -> nan
Mathematica: 	N[EllipticK[3]] -> 1.00108 - 1.17142 I

How could one get the Mathematica results in Scipy?


Thanks,
Iordan Hristov
University of Calgary


More information about the SciPy-user mailing list