nolta / Elliptic.jl

Elliptic integral and Jacobi elliptic special functions
MIT License
31 stars 16 forks source link

Elliptic.K does not take negative arguments #12

Closed gwater closed 4 years ago

gwater commented 6 years ago

Elliptic.K(x) currently raises a DomainError for negative x.

However, K(x) can be calculated for negative arguments with the existing routine using the identity given in Eq. (11) of this text.

Ideally, Elliptic.K(x) would just check for negative x and map it to a positive x automatically.

nolta commented 4 years ago

K, E, and ellipke now accept negative arguments.