bridge/class-master/depend/pari/src/basemath/ecpp.c
/* PARI ECPP Certificate -> Human-readable format */
PARI ECPP Certificate -> Human-readable format
PARI ECPP Certificate - > Human - readable format
static GEN
cert_out(GEN x)
{
  long i, l = lg(x);
  pari_str str;
  str_init(&str, 1);
  if (typ(x) == t_INT)
  {
    str_printf(&str, "%Ps is prime.\nIndeed, ispseudoprime(%Ps) = 1 and %Ps < 2^64.\n", x, x, x);
    return strtoGENstr(str.string);
  }
  for (i = 1; i < l; i++)
  {
    GEN xi = gel(x, i);
    str_printf(&str, "[%ld]\n", i);
    str_printf(&str, " N = %Ps\n", cert_get_N(xi));
    str_printf(&str, " t = %Ps\n", cert_get_t(xi));
    str_printf(&str, " s = %Ps\n", cert_get_s(xi));
    str_printf(&str, "a4 = %Ps\n", cert_get_a4(xi));
    str_printf(&str, "D = %Ps\n", cert_get_D(xi));
    str_printf(&str, "m = %Ps\n", cert_get_m(xi));
    str_printf(&str, "q = %Ps\n", cert_get_q(xi));
    str_printf(&str, "E = %Ps\n", cert_get_E(xi));
    str_printf(&str, "P = %Ps\n", cert_get_P(xi));
  }
  return strtoGENstr(str.string);
}
static GEN cert_out ( GEN x ) { long i , l = lg ( x ) ; pari_str str ; str_init ( & str , 1 ) ; if ( typ ( x ) == t_INT ) { str_printf ( & str , " \n \n " , x , x , x ) ; return strtoGENstr ( str . string ) ; } for ( i = 1 ; i < l ; i ++ ) { GEN xi = gel ( x , i ) ; str_printf ( & str , " \n " , i ) ; str_printf ( & str , " \n " , cert_get_N ( xi ) ) ; str_printf ( & str , " \n " , cert_get_t ( xi ) ) ; str_printf ( & str , " \n " , cert_get_s ( xi ) ) ; str_printf ( & str , " \n " , cert_get_a4 ( xi ) ) ; str_printf ( & str , " \n " , cert_get_D ( xi ) ) ; str_printf ( & str , " \n " , cert_get_m ( xi ) ) ; str_printf ( & str , " \n " , cert_get_q ( xi ) ) ; str_printf ( & str , " \n " , cert_get_E ( xi ) ) ; str_printf ( & str , " \n " , cert_get_P ( xi ) ) ; } return strtoGENstr ( str . string ) ; }
PARI ECPP Certificate -> Human-readable format
PARI ECPP Certificate - > Human - readable format