Calculates \(e_1,e_2,e_3\) from the invariants using
either polyroot
or Cardano's method.
e1e2e3(g, use.laurent=TRUE, AnS=is.double(g), Omega=NULL, tol=1e-6)
eee.cardano(g)
Two-element vector with g=c(g2,g3)
Boolean, with default TRUE
meaning
to use P.laurent()
to determine the correct ordering for the
\(e\): \(\wp(\omega_1)\), \(\wp(\omega_2)\),
\(\wp(\omega_3)\). Setting to FALSE
means to
return the solutions of the cubic equation directly: this is much
faster, but is not guaranteed to find the \(e_i\) in the
right order (the roots are found according to the vagaries of
polyroot()
)
Boolean, with default TRUE
meaning to define
\(\omega_3\) as per ams-55, and FALSE
meaning to
follow Whittaker and Watson, and define
\(\omega_1\) and \(\omega_2\) as the
primitive half periods, and
\(\omega_3=-\omega_1-\omega_2\). This is
also consistent with Chandrasekharan except the factor of 2.
Also note that setting AnS
to TRUE
forces the
\(e\) to be real
A pair of primitive half periods, if known. If supplied, the
function uses them to calculate approximate values for the three
\(e\)s (but supplies values calculated by polyroot()
,
which are much more accurate). The function needs the approximate
values to determine in which order the \(e\)s should be, as
polyroot()
returns roots in whichever order the polynomial
solver gives them in
Real, relative tolerance criterion for terminating Laurent summation
Returns a three-element vector.
Mathematica
# NOT RUN {
sum(e1e2e3(g=c(1,2)))
# }
Run the code above in your browser using DataCamp Workspace