| 管理员 on Tue, 02 Dec 2025 05:41:09 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| fiz elleta more cases |
static int
is_special_lattice(GEN w1, GEN w2)
{
if (!is_real_t(w2)) return 0;
return gdvd(gmul2n(real_i(w1),1),w2);
}
GEN
elleta(GEN om, long prec)
{
pari_sp av = avma;
GEN y1, y2, E2, pi;
ellred_t T;
if (!check_periods(om, &T))
{
pari_err_TYPE("elleta",om);
return NULL;/*LCOV_EXCL_LINE*/
}
if (T.type == t_PER_ELL) return ellR_eta(om, prec);
compute_periods(&T, NULL, prec);
prec = T.prec;
pi = mppi(prec);
E2 = cxEk(T.Tau, 2, prec); /* E_2(Tau) */
if (signe(T.c))
{
GEN u = gdiv(T.w2, T.W2);
/* E2 := u^2 E2 + 6iuc/pi = E_2(tau) */
E2 = gadd(gmul(gsqr(u), E2), mulcxI(gdiv(gmul(mului(6,T.c), u), pi)));
}
y2 = gdiv(gmul(E2, sqrr(pi)), gmulsg(3, T.w2));
y1 = gsub(gmul(T.tau,y2), PiI2div(T.w2, prec));
if (is_special_lattice(w2,w1)) y1 = real_i(y1);
if (is_special_lattice(w1,w2)) y2 = real_i(y2);
if (T.swap) swap(y1,y2);
return gc_GEN(av, mkvec2(y1,y2));
}
/* test cases: elleta([3,3/2+I]), elleta([3,3/2-I]), elleta([3,3/2+10*I]), elleta([3,3/2-10*I]), elleta([3,2+10*I]), elleta([3,2-10*I]) */