elliptic (version 1.4-0)

coqueraux: Fast, conceptually simple, iterative scheme for Weierstrass P functions

Description

Fast, conceptually simple, iterative scheme for Weierstrass \(\wp\) functions, following the ideas of Robert Coqueraux

Usage

coqueraux(z, g, N = 5, use.fpp = FALSE, give = FALSE)

Arguments

z

Primary complex argument

g

Invariants; if an object of type parameters is supplied, the invariants will be extracted appropriately

N

Number of iterations to use

use.fpp

Boolean, with default FALSE meaning to not reduce z to the fpp. Setting to TRUE reduces z to the fpp via parameters(): this is more accurate (see example) but slower

give

Boolean, with TRUE meaning to return an estimate of the error, and FALSE meaning to return just the value

References

R. Coqueraux, 1990. Iterative method for calculation of the Weierstrass elliptic function, IMA Journal of Numerical Analysis, volume 10, pp119-128

Examples

Run this code
# NOT RUN {
 z <- seq(from=1+1i,to=30-10i,len=55)
 p <- P(z,c(0,1))
 c.true <- coqueraux(z,c(0,1),use.fpp=TRUE)
 c.false <- coqueraux(z,c(0,1),use.fpp=FALSE)
 plot(1:55,abs(p-c.false))
 points(1:55,abs(p-c.true),pch=16)
 
# }

Run the code above in your browser using DataCamp Workspace