Weierstrass elliptic function
Evaluation of the Weierstrass elliptic function and its derivatives.
wp(z, g = NULL, omega = NULL, tau = NULL, derivative = 0L)
z
: complex number, vector or matrixg
: the elliptic invariants, a vector of two complex numbers; only one of g
, omega
and tau
must be givenomega
: the half-periods, a vector of two complex numbers; only one of g
, omega
and tau
must be giventau
: the half-periods ratio; supplying tau
is equivalent to supply omega = c(1/2, tau/2)
derivative
: differentiation order, an integer between 0 and 3A complex number, vector or matrix.
omega1 <- 1.4 - 1i omega2 <- 1.6 + 0.5i omega <- c(omega1, omega2) e1 <- wp(omega1, omega = omega) e2 <- wp(omega2, omega = omega) e3 <- wp(-omega1-omega2, omega = omega) e1 + e2 + e3 # should be 0