bridge/class-master/depend/pari/src/basemath/lfunutils.c
/* Assume E to be twist-minimal */
Assume E to be twist-minimal
Assume E to be twist - minimal
static GEN
lfunellmfpetersmintwist(GEN E, long bitprec)
{
  pari_sp av = avma;
  GEN symsq, veceuler, N = ellQ_get_N(E), fudge = gen_1;
  long j, k = 2;
  symsq = lfunellsymsqmintwist(E);
  veceuler = gel(symsq,2);
  for (j = 1; j < lg(veceuler); j++)
  {
    GEN v = gel(veceuler,j), p = gel(v,1), q = powis(p,1-k);
    long s = signe(gel(v,2));
    if (s) fudge = gmul(fudge, s==1 ? gaddsg(1, q): gsubsg(1, q));
  }
  return gerepileupto(av, mfpeters(gel(symsq,1),fudge,N,k,bitprec));
}
static GEN lfunellmfpetersmintwist ( GEN E , long bitprec ) { pari_sp av = avma ; GEN symsq , veceuler , N = ellQ_get_N ( E ) , fudge = gen_1 ; long j , k = 2 ; symsq = lfunellsymsqmintwist ( E ) ; veceuler = gel ( symsq , 2 ) ; for ( j = 1 ; j < lg ( veceuler ) ; j ++ ) { GEN v = gel ( veceuler , j ) , p = gel ( v , 1 ) , q = powis ( p , 1 - k ) ; long s = signe ( gel ( v , 2 ) ) ; if ( s ) fudge = gmul ( fudge , s == 1 ? gaddsg ( 1 , q ) : gsubsg ( 1 , q ) ) ; } return gerepileupto ( av , mfpeters ( gel ( symsq , 1 ) , fudge , N , k , bitprec ) ) ; }
Assume E to be twist-minimal
Assume E to be twist - minimal