/* Pari
/* Weierstrass p-function
/* Author: Joachim Wehler
*/
default(format, "f0.10" ); 

print ("===================================================="); 
print ( "Weierstrass p-function, Start \n");

rho=(-1+sqrt(3)*I)/2;
 
case = 2;

if (case == 1, lattice_base = [1, I]);
if (case == 2, lattice_base = [1, rho]);

/* Normalized lattice */
nl = ellperiods(lattice_base);
/* Half lattice points */
hl = [nl[1]/2, nl[2]/2, (nl[1] + nl[2])/2 ];

wp = ellwp( nl, , 1 );

print ( "Lattice with normalized periods (omega_1,omega_2) = (", nl[1], ",", nl[2], ")", "\n");
print ( "Weierstrass p-function wp: \n\n", wp[1], "\n");
print ( "Derivation wp_prime: \n\n", wp[2], "\n");
print ( "wp_prime at half-lattice points = \n", hl[1], ": ", ellwp( nl, hl[1], 1)[2], "\n", hl[2], ": ", ellwp( nl, hl[2], 1)[2], "\n", hl[3], ": ",ellwp( nl, hl[3], 1)[2], "\n");

print ( "Weierstrass p-function, End");
print("====================================================");


