Function: ellperiods
Section: elliptic_curves
C-Name: ellperiods
Prototype: GD0,L,p
Help: ellperiods(w, {flag = 0}): w describes a complex period lattice ([w1,w2]
 or an ellinit structure). Returns normalized periods [W1,W2] generating the
 same lattice such that tau := W1/W2 satisfies Im(tau) > 0 and lies in the
 standard fundamental domain for SL2. If flag is 1, the return value is
 [[W1,W2], [e1,e2]], where e1, e2 are the quasi-periods attached to
 [W1,W2], satisfying e2 W1 - e1 W2 = 2 Pi I.
Doc: Let $w$ describe a complex period lattice ($w = [w_1,w_2]$
 or an \kbd{ellinit} structure). Returns normalized periods $[W_1,W_2]$ generating
 the same lattice such that $\tau := W_1/W_2$ has positive imaginary part
 and lies in the standard fundamental domain for $\text{SL}_2(\Z)$.

 If $\fl = 1$, the function returns $[[W_1,W_2], [\eta_1,\eta_2]]$, where
 $\eta_1$ and $\eta_2$ are the quasi-periods attached to
 $[W_1,W_2]$, satisfying $\eta_2 W_1 - \eta_1 W_2 = 2 i \pi$.

 The output of this function is meant to be used as the first argument
 given to ellwp, ellzeta, ellsigma or elleisnum. Quasi-periods are
 needed by ellzeta and ellsigma only.

 \bprog
 ? L = ellperiods([1,I],1);
 ? [w1,w2] = L[1]; [e1,e2] = L[2];
 ? e2*w1 - e1*w2
 %3 = 6.2831853071795864769252867665590057684*I
 ? ellzeta(L, 1/2 + 2*I)
 %4 = 1.5707963... - 6.283185307...*I
 ? ellzeta([1,I], 1/2 + 2*I) \\ same but less efficient
 %4 = 1.5707963... - 6.283185307...*I
 @eprog
