bridge/class-master/depend/pari/src/basemath/FpE.c
/* Derived from APIP from and by Jerome Milan, 2012 */
Derived from APIP from and by Jerome Milan, 2012
Derived from APIP from and by Jerome Milan 2012
static GEN
FpE_vert(GEN P, GEN Q, GEN a4, GEN p)
{
  if (ell_is_inf(P))
    return gen_1;
  if (!equalii(gel(Q, 1), gel(P, 1)))
    return Fp_sub(gel(Q, 1), gel(P, 1), p);
  if (signe(gel(P,2))!=0) return gen_1;
  return Fp_inv(Fp_add(Fp_mulu(Fp_sqr(gel(P,1),p), 3, p), a4, p), p);
}
static GEN FpE_vert ( GEN P , GEN Q , GEN a4 , GEN p ) { if ( ell_is_inf ( P ) ) return gen_1 ; if ( ! equalii ( gel ( Q , 1 ) , gel ( P , 1 ) ) ) return Fp_sub ( gel ( Q , 1 ) , gel ( P , 1 ) , p ) ; if ( signe ( gel ( P , 2 ) ) != 0 ) return gen_1 ; return Fp_inv ( Fp_add ( Fp_mulu ( Fp_sqr ( gel ( P , 1 ) , p ) , 3 , p ) , a4 , p ) , p ) ; }
Derived from APIP from and by Jerome Milan, 2012
Derived from APIP from and by Jerome Milan 2012