Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pari

Wrappers for PARI functions


Description

Wrappers for the three elliptic functions of PARI

Usage

P.pari(z,Omega,pari.fun="ellwp",numerical=TRUE)

Arguments

z

Complex argument

Omega

Half periods

pari.fun

String giving the name of the function passed to PARI. Values of ellwp, ellsigma, and ellzeta, are acceptable here for the Weierstrass P function, the sigma function, and the zeta function respectively

numerical

Boolean with default TRUE meaning to return the complex value returned by PARI, and FALSE meaning to return the ascii string returned by PARI

Details

This function calls PARI via an R system() call.

Value

Returns an object with the same attributes as z.

Note

Function translates input into, for example, “ellwp([1+1*I,2+3*I],1.111+5.1132*I)” and pipes this string directly into gp.

The PARI system clearly has more powerful syntax than the basic version that I'm using here, but I can't (for example) figure out how to vectorize any of the calls.

Author(s)

Robin K. S. Hankin

References

Examples

## Not run:  #this in a dontrun environment because it requires pari/gp 
z  <- seq(from=1,to=3+2i,len=34)
p <- c(1,1i)
plot(abs(P.pari(z=z,Omega=p) - P(z=z,Omega=p)))
plot(zeta(z=z,params=parameters(Omega=p))- P.pari(z=z,Omega=c(p),pari.fun="ellzeta"))


## End(Not run)

elliptic

Weierstrass and Jacobi Elliptic Functions

v1.4-0
GPL-2
Authors
Robin K. S. Hankin [aut, cre] (<https://orcid.org/0000-0001-5982-0415>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.