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
