Code coverage tests

This page documents the degree to which the PARI/GP source code is tested by our public test suite, distributed with the source distribution in directory src/test/. This is measured by the gcov utility; we then process gcov output using the lcov frond-end.

We test a few variants depending on Configure flags on the pari.math.u-bordeaux.fr machine (x86_64 architecture), and agregate them in the final report:

The target is to exceed 90% coverage for all mathematical modules (given that branches depending on DEBUGLEVEL or DEBUGMEM are not covered). This script is run to produce the results below.

LCOV - code coverage report
Current view: top level - headers - paripriv.h (source / functions) Hit Total Coverage
Test: PARI/GP v2.12.1 lcov report (development 25819-e703fe1174) Lines: 7 7 100.0 %
Date: 2020-09-18 06:10:04 Functions: 5 5 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* Copyright (C) 2004  The PARI group.
       2             : 
       3             : This file is part of the PARI/GP package.
       4             : 
       5             : PARI/GP is free software; you can redistribute it and/or modify it under the
       6             : terms of the GNU General Public License as published by the Free Software
       7             : Foundation. It is distributed in the hope that it will be useful, but WITHOUT
       8             : ANY WARRANTY WHATSOEVER.
       9             : 
      10             : Check the License for details. You should have received a copy of it, along
      11             : with the package; see the file 'COPYING'. If not, write to the Free Software
      12             : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
      13             : 
      14             : BEGINEXTERN
      15             : 
      16             : /* for qsort */
      17             : typedef int (*QSCOMP)(const void *, const void *);
      18             : 
      19             : #define uel(a,i)            (((ulong*)(a))[i])
      20             : #define ucoeff(a,i,j)       (((ulong**)(a))[j][i])
      21             : #define umael(a,i,j)        (((ulong**)(a))[i][j])
      22             : #define umael2(a,i,j)       (((ulong**)(a))[i][j])
      23             : #define umael3(a,i,j,k)     (((ulong***)(a))[i][j][k])
      24             : #define umael4(a,i,j,k,l)   (((ulong****)(a))[i][j][k][l])
      25             : #define umael5(a,i,j,k,l,m) (((ulong*****)(a))[i][j][k][l][m])
      26             : 
      27             : #define numberof(x) (sizeof(x) / sizeof((x)[0]))
      28             : 
      29             : /* to manipulate 'blocs' */
      30             : #define BL_HEAD 8
      31             : #define bl_base(x) (void*)((x) - BL_HEAD)
      32             : #define bl_height(x) (((GEN)x)[-8])
      33             : #define bl_left(x)   (((GEN*)x)[-7])
      34             : #define bl_right(x)  (((GEN*)x)[-6])
      35             : #define bl_size(x)   (((GEN)x)[-5])
      36             : #define bl_refc(x)   (((GEN)x)[-4])
      37             : #define bl_next(x)   (((GEN*)x)[-3])
      38             : #define bl_prev(x)   (((GEN*)x)[-2])
      39             : #define bl_num(x)    (((GEN)x)[-1])
      40             : 
      41             : void clone_lock(GEN C);
      42             : void clone_unlock(GEN C);
      43             : void clone_unlock_deep(GEN C);
      44             : 
      45             : /* swap */
      46             : #define lswap(x,y) {long _z=x; x=y; y=_z;}
      47             : #define pswap(x,y) {GEN *_z=x; x=y; y=_z;}
      48             : #define swap(x,y)  {GEN  _z=x; x=y; y=_z;}
      49             : #define dswap(x,y) { double _t=x; x=y; y=_t; }
      50             : #define pdswap(x,y) { double* _t=x; x=y; y=_t; }
      51             : #define swapspec(x,y, nx,ny) {swap(x,y); lswap(nx,ny);}
      52             : 
      53             : /* loops */
      54             : GEN incloop(GEN a);
      55             : GEN resetloop(GEN a, GEN b);
      56             : GEN setloop(GEN a);
      57             : 
      58             : /* parser */
      59             : 
      60             : /* GP control structures */
      61             : #define EXPR_WRAP(code, call) \
      62             : { GEN z; GEN __E = code; \
      63             :   push_lex(gen_0, __E); z = call; pop_lex(1); return z; }
      64             : #define EXPRVOID_WRAP(code, call) \
      65             : { GEN __E = code; \
      66             :   push_lex(gen_0, __E); call; pop_lex(1); }
      67             : #define EXPR_ARG __E, &gp_eval
      68             : #define EXPR_ARGPREC __E, &gp_evalprec
      69             : #define EXPR_ARGUPTO __E, &gp_evalupto
      70             : #define EXPR_ARGBOOL __E, &gp_evalbool
      71             : #define EXPR_ARGVOID __E, &gp_evalvoid
      72             : 
      73             : GEN  iferrpari(GEN a, GEN b, GEN c);
      74             : void forfactored(GEN a, GEN b, GEN code);
      75             : void forpari(GEN a, GEN b, GEN node);
      76             : void foreachpari(GEN a, GEN node);
      77             : void forsquarefree(GEN a, GEN b, GEN code);
      78             : void untilpari(GEN a, GEN b);
      79             : void whilepari(GEN a, GEN b);
      80             : GEN  ifpari(GEN g, GEN a, GEN b);
      81             : GEN  andpari(GEN a, GEN b);
      82             : GEN  orpari(GEN a, GEN b);
      83             : void ifpari_void(GEN g, GEN a, GEN b);
      84             : GEN  ifpari_multi(GEN g, GEN a);
      85             : GEN  geval_gp(GEN x, GEN t);
      86             : 
      87             : GEN  gadde(GEN *x, GEN y);
      88             : GEN  gadd1e(GEN *x);
      89             : GEN  gdive(GEN *x, GEN y);
      90             : GEN  gdivente(GEN *x, GEN y);
      91             : GEN  gdivrounde(GEN *x, GEN y);
      92             : GEN  gmode(GEN *x, GEN y);
      93             : GEN  gmule(GEN *x, GEN y);
      94             : GEN  gshiftle(GEN *x, long n);
      95             : GEN  gshiftre(GEN *x, long n);
      96             : GEN  gsube(GEN *x, GEN y);
      97             : GEN  gsub1e(GEN *x);
      98             : GEN  gshift_right(GEN x, long n);
      99             : 
     100             : GEN  asympnum0(GEN u, GEN alpha, long prec);
     101             : GEN  asympnumraw0(GEN u, long LIM, GEN alpha, long prec);
     102             : GEN  derivnum0(GEN a, GEN code, GEN ind, long prec);
     103             : GEN  derivfun0(GEN args, GEN def, GEN code, long k, long prec);
     104             : GEN  direuler0(GEN a, GEN b, GEN code, GEN c);
     105             : GEN  direuler_bad(void *E, GEN (*eval)(void *, GEN, long), GEN a, GEN b, GEN c, GEN Sbad);
     106             : void forcomposite(GEN a, GEN b, GEN code);
     107             : void fordiv(GEN a, GEN code);
     108             : void fordivfactored(GEN a, GEN code);
     109             : void forell0(long a, long b, GEN code, long flag);
     110             : void forperm0(GEN k, GEN code);
     111             : void forprime(GEN a, GEN b, GEN code);
     112             : void forprimestep(GEN a, GEN b, GEN q, GEN code);
     113             : void forstep(GEN a, GEN b, GEN s, GEN code);
     114             : void forsubgroup0(GEN cyc, GEN bound, GEN code);
     115             : void forsubset0(GEN nk, GEN code);
     116             : void forvec(GEN x, GEN code, long flag);
     117             : void forpart0(GEN k, GEN code , GEN nbound, GEN abound);
     118             : GEN  intcirc0(GEN a, GEN R, GEN code, GEN tab, long prec);
     119             : GEN  intfuncinit0(GEN a, GEN b, GEN code, long m, long prec);
     120             : GEN  intnum0(GEN a, GEN b, GEN code, GEN tab, long prec);
     121             : GEN  intnumgauss0(GEN a, GEN b, GEN code, GEN tab, long prec);
     122             : GEN  intnumromb0_bitprec(GEN a, GEN b, GEN code, long flag, long bit);
     123             : GEN  laurentseries0(GEN f, long M, long v, long prec);
     124             : GEN  limitnum0(GEN u, GEN alpha, long prec);
     125             : GEN  matrice(GEN nlig, GEN ncol, GEN code);
     126             : void pariplot0(GEN a, GEN b, GEN code, GEN ysmlu, GEN ybigu, long prec);
     127             : GEN  prodeuler0(GEN a, GEN b, GEN code, long prec);
     128             : GEN  prodinf0(GEN a, GEN code, long flag, long prec);
     129             : GEN  produit(GEN a, GEN b, GEN code, GEN x);
     130             : GEN  somme(GEN a, GEN b, GEN code, GEN x);
     131             : GEN  sumalt0(GEN a, GEN code,long flag, long prec);
     132             : GEN  sumdivexpr(GEN num, GEN code);
     133             : GEN  sumdivmultexpr0(GEN num, GEN code);
     134             : GEN  suminf0_bitprec(GEN a, GEN code, long bit);
     135             : GEN  sumnum0(GEN a, GEN code, GEN tab, long prec);
     136             : GEN  sumnumap0(GEN a, GEN code, GEN tab, long prec);
     137             : GEN  sumnumlagrange0(GEN a, GEN code, GEN tab, long prec);
     138             : GEN  sumnummonien0(GEN a, GEN code, GEN tab, long prec);
     139             : GEN  sumpos0(GEN a, GEN code, long flag,long prec);
     140             : GEN  vecexpr0(GEN nmax, GEN code, GEN pred);
     141             : GEN  vecexpr1(GEN nmax, GEN code, GEN pred);
     142             : GEN  vecteursmall(GEN nmax, GEN code);
     143             : GEN  vecteur(GEN nmax, GEN n);
     144             : GEN  vvecteur(GEN nmax, GEN n);
     145             : GEN  zbrent0(GEN a, GEN b, GEN code, long prec);
     146             : GEN  solvestep0(GEN a, GEN b, GEN step, GEN code, long flag, long prec);
     147             : 
     148             : GEN  ploth0(GEN a, GEN b, GEN code, long flag, long n, long prec);
     149             : GEN  plothexport0(GEN fmt, GEN a, GEN b, GEN code, long flags, long n, long prec);
     150             : GEN  psploth0(GEN a,GEN b,GEN code,long flag,long n,long prec);
     151             : GEN  plotrecth0(long ne,GEN a,GEN b,GEN code,ulong flags,long n,long prec);
     152             : 
     153             : GEN  listcreate_gp(long n);
     154             : 
     155             : /* mt */
     156             : void mt_sigint(void);
     157             : void mt_err_recover(long er);
     158             : void mt_export_add(const char *str, GEN val);
     159             : void mt_export_del(const char *str);
     160             : void mt_init_stack(size_t s);
     161             : int  mt_is_thread(void);
     162             : 
     163             : GEN  eisker_worker(GEN Ei, GEN M, GEN D, GEN co, GEN CD);
     164             : GEN  pareval_worker(GEN code);
     165             : GEN  parselect_worker(GEN d, GEN code);
     166             : void parfor0(GEN a, GEN b, GEN code, GEN code2);
     167             : GEN  parfor_worker(GEN i, GEN C);
     168             : void parforeach0(GEN x, GEN code, GEN code2);
     169             : void parforprime0(GEN a, GEN b, GEN code, GEN code2);
     170             : void parforprimestep0(GEN a, GEN b, GEN q, GEN code, GEN code2);
     171             : void parforvec0(GEN a, GEN code, GEN code2, long flag);
     172             : GEN  parvector_worker(GEN i, GEN C);
     173             : GEN  polmodular_worker(GEN pt, ulong L, GEN hilb, GEN factu,
     174             :        GEN vne, GEN vinfo, long compute_derivs, GEN j_powers, GEN fdb);
     175             : GEN  nmV_polint_center_tree_worker(GEN Va, GEN T, GEN R, GEN xa, GEN m2);
     176             : GEN  nmV_chinese_center_tree_seq(GEN A, GEN P, GEN T, GEN R);
     177             : GEN  nxMV_polint_center_tree_worker(GEN Va, GEN T, GEN R, GEN xa, GEN m2);
     178             : GEN  nxMV_chinese_center_tree_seq(GEN A, GEN P, GEN T, GEN R);
     179             : GEN  F2xq_log_Coppersmith_worker(GEN u, long i, GEN V, GEN R);
     180             : GEN  Flxq_log_Coppersmith_worker(GEN u, long i, GEN V, GEN R);
     181             : GEN  Fp_log_sieve_worker(long a, long prmax, GEN C, GEN c, GEN Ci, GEN ci, GEN pr, GEN sz);
     182             : GEN  QM_charpoly_ZX_worker(GEN P, GEN M, GEN dM);
     183             : GEN  QXQ_div_worker(GEN P, GEN A, GEN B, GEN C);
     184             : GEN  QXQ_inv_worker(GEN P, GEN A, GEN B);
     185             : GEN  ZX_resultant_worker(GEN P, GEN A, GEN B, GEN dB);
     186             : GEN  ZXQX_resultant_worker(GEN P, GEN A, GEN B, GEN T, GEN dB);
     187             : GEN  ZX_ZXY_resultant_worker(GEN P, GEN A, GEN B, GEN dB, GEN v);
     188             : GEN  ZX_direct_compositum_worker(GEN P, GEN A, GEN B);
     189             : GEN  ZXQX_direct_compositum_worker(GEN P, GEN A, GEN B, GEN C);
     190             : GEN  ZX_gcd_worker(GEN P, GEN A, GEN B, GEN g);
     191             : GEN  ZXQ_minpoly_worker(GEN P, GEN A, GEN B, long d);
     192             : GEN  ZM_det_worker(GEN P, GEN A);
     193             : GEN  ZM_inv_worker(GEN P, GEN A);
     194             : GEN  ZM_ker_worker(GEN P, GEN A);
     195             : GEN  ZM_mul_worker(GEN P, GEN A, GEN B);
     196             : GEN  ZabM_inv_worker(GEN P, GEN A, GEN Q);
     197             : GEN  aprcl_step4_worker(ulong q, GEN pC, GEN N, GEN v);
     198             : GEN  aprcl_step6_worker(GEN r, long t, GEN N, GEN N1, GEN et);
     199             : GEN  ecpp_sqrt_worker(GEN g, GEN N, GEN p);
     200             : GEN  ecpp_ispsp_worker(GEN N);
     201             : GEN  ecpp_step2_worker(GEN S, GEN HD, GEN primelist);
     202             : GEN  primecertisvalid_ecpp_worker(GEN certi);
     203             : GEN  lfuninit_worker(long r, GEN K, GEN L, GEN peh2d, GEN vroots, GEN dr, GEN di, GEN an, GEN bn);
     204             : GEN  lfuninit_theta2_worker(long r, GEN L, GEN qk, GEN a, GEN di, GEN an, GEN bn);
     205             : GEN  gen_parapply(GEN worker, GEN D);
     206             : GEN  parapply_slice_worker(GEN worker, GEN D);
     207             : GEN  gen_parapply_slice(GEN worker, GEN D, long mmin);
     208             : GEN  gen_crt(const char *str, GEN worker, forprime_t *S, GEN dB, ulong bound, long mmin, GEN *pt_mod,
     209             :              GEN crt(GEN, GEN, GEN*), GEN center(GEN, GEN, GEN));
     210             : void gen_inccrt(const char *str, GEN worker, GEN dB, long n, long mmin,
     211             :            forprime_t *S, GEN *pt_H, GEN *pt_mod, GEN crt(GEN, GEN, GEN*),
     212             :            GEN center(GEN, GEN, GEN));
     213             : void gen_inccrt_i(const char *str, GEN worker, GEN dB, long n, long mmin,
     214             :            forprime_t *S, GEN *pH, GEN *pmod, GEN crt(GEN, GEN, GEN*),
     215             :            GEN center(GEN, GEN, GEN));
     216             : GEN  direllnf_worker(GEN P, ulong X, GEN E);
     217             : GEN  dirartin_worker(GEN P, ulong X, GEN nf, GEN G, GEN V, GEN aut);
     218             : GEN  direllsympow_worker(GEN P, ulong X, GEN E, ulong m);
     219             : GEN  dirgenus2_worker(GEN P, ulong X, GEN Q);
     220             : GEN  pardireuler(GEN worker, GEN a, GEN b, GEN c, GEN Sbad);
     221             : GEN  FpM_ratlift_worker(GEN A, GEN mod, GEN B);
     222             : GEN  ellQ_factorback_worker(GEN A, GEN P, GEN L, GEN c4);
     223             : GEN  chinese_unit_worker(GEN P, GEN A, GEN U, GEN B, GEN D, GEN C);
     224             : 
     225             : /* Relative number fields */
     226             : enum { rnf_NFABS = 1, rnf_MAPS };
     227             : 
     228             : /* Finite fields */
     229             : enum { t_FF_FpXQ = 0, t_FF_Flxq = 1, t_FF_F2xq = 2 };
     230             : GEN FF_ellinit(GEN E, GEN fg);
     231             : GEN FF_elldata(GEN E, GEN fg);
     232             : 
     233             : /* L functions */
     234             : enum { t_LFUN_GENERIC, t_LFUN_ZETA, t_LFUN_NF, t_LFUN_ELL, t_LFUN_KRONECKER,
     235             :        t_LFUN_CHIZ, t_LFUN_CHIGEN, t_LFUN_ETA,
     236             :        t_LFUN_DIV, t_LFUN_MUL, t_LFUN_CONJ,
     237             :        t_LFUN_SYMPOW_ELL, t_LFUN_QF, t_LFUN_ARTIN, t_LFUN_MFCLOS,
     238             :        t_LFUN_GENUS2, t_LFUN_TWIST, t_LFUN_CLOSURE0, t_LFUN_SHIFT};
     239             : enum { t_LDESC_INIT, t_LDESC_THETA, t_LDESC_PRODUCT };
     240             : 
     241             : /* Elliptic curves */
     242             : /* common to Q and Rg */
     243             : enum { R_PERIODS = 1, R_ETA, R_ROOTS, R_AB };
     244             : 
     245             : enum { Qp_ROOT = 1, Qp_TATE };
     246             : enum { Q_GROUPGEN = 5, Q_GLOBALRED, Q_ROOTNO, Q_MINIMALMODEL };
     247             : enum { NF_MINIMALMODEL = 1, NF_GLOBALRED, NF_MINIMALPRIMES, NF_ROOTNO, NF_NF };
     248             : 
     249             : /* common to Fp and Fq */
     250             : enum { FF_CARD = 1, FF_GROUP, FF_GROUPGEN, FF_O };
     251             : 
     252             : /* for Buchall_param */
     253             : enum { fupb_NONE = 0, fupb_RELAT, fupb_LARGE, fupb_PRECI };
     254             : 
     255             : /* Polycyclic presentation for the classgroup of discriminant D */
     256             : typedef struct {
     257             :   long D; /* Negative discriminant */
     258             :   long h; /* Size of classgroup */
     259             :   long enum_cnt; /* Either h or h/2 (if L0 is set) */
     260             :   /* If nonzero, L0=L[0] and n[0]=2 and classpoly is a perfect square
     261             :    * (and we enumerate each double root just once), default is 0 */
     262             :   long L0;
     263             :   /* Product of primes L that are prohibited as norms of generators or
     264             :    * auxilliary prime forms (by default, primes that make enumeration hard) */
     265             :   long Lfilter;
     266             :   /* Norms of implicit generators (primeforms a=(L*x^2+b*x*y+c*y^2)
     267             :    * with norm L and b >=0) */
     268             :   long *L;
     269             :   long *m; /* products of relative orders: m[i] is the order of <g_1,...,g_i> */
     270             :   long *n; /* Relative orders */
     271             :   long *o; /* Absolute orders */
     272             :   /* Power relations (a[i]^n[i] = a[0]^e[0]*...*a[i-1]^e[i-1], where e
     273             :    * is an exponent vector of length i stored at offset binom(i,2) of r) */
     274             :   long *r;
     275             :   long *orient_p; /* Optional list of norms of orienting primes p ... */
     276             :   long *orient_q; /* or product of primes p*q (q=1 when only p is needed) */
     277             :   long *orient_reps; /* Representation of orienting norm p*q in terms of Ls */
     278             :   long inv; /* Attached invariant */
     279             :   long k; /* Number of generators */
     280             :   GEN _data; /* Storage space for the above arrays */
     281             : } classgp_pcp_struct;
     282             : typedef classgp_pcp_struct classgp_pcp_t[1];
     283             : 
     284             : /* Represents the data in the equation(s)
     285             :  *   4p = t^2 - v^2 D = t^2 - v^2 u^2 D_K = w^2 D_K.
     286             :  * t is the absolute trace, so always > 0.
     287             :  * T is a twisting parameter, which satisfies (T|p) == -1. */
     288             : typedef struct {
     289             :   long D, t, u, v;
     290             :   ulong p, pi, s2, T;
     291             : } norm_eqn_struct;
     292             : typedef norm_eqn_struct norm_eqn_t[1];
     293             : 
     294             : #define zv_to_longptr(v) (&((v)[1]))
     295             : #define zv_to_ulongptr(v) ((ulong *)&((v)[1]))
     296             : 
     297             : /* Modular invariants */
     298             : #define INV_J       0
     299             : #define INV_F       1
     300             : #define INV_F2      2
     301             : #define INV_F3      3
     302             : #define INV_F4      4
     303             : #define INV_G2      5
     304             : #define INV_W2W3    6
     305             : #define INV_F8      8
     306             : #define INV_W3W3    9
     307             : #define INV_W2W5    10
     308             : #define INV_W2W7    14
     309             : #define INV_W3W5    15
     310             : #define INV_W3W7    21
     311             : #define INV_W2W3E2  23
     312             : #define INV_W2W5E2  24
     313             : #define INV_W2W13   26
     314             : #define INV_W2W7E2  27
     315             : #define INV_W3W3E2  28
     316             : #define INV_W5W7    35
     317             : #define INV_W3W13   39
     318             : 
     319             : /* Get coefficient of x^d in f, assuming f is nonzero. */
     320    13974392 : INLINE ulong Flx_coeff(GEN f, long d) { return f[d + 2]; }
     321             : /* Return the root of f, assuming deg(f) = 1. */
     322      232512 : INLINE ulong Flx_deg1_root(GEN f, ulong p) {
     323      232512 :   if (degpol(f) != 1) pari_err_BUG("Flx_deg1_root");
     324      232514 :   return Fl_div(Fl_neg(Flx_coeff(f, 0), p), Flx_coeff(f, 1), p);
     325             : }
     326             : 
     327             : /* Allocation / gerepile */
     328             : long   getdebugvar(void);
     329             : void   setdebugvar(long n);
     330             : void   debug_stack(void);
     331             : void   fill_stack(void);
     332             : void   minim_alloc(long n, double ***q, GEN *x, double **y,  double **z, double **v);
     333             : int    pop_entree_block(entree *ep, long loc);
     334             : int    pop_val_if_newer(entree *ep, long loc);
     335             : 
     336             : /* general printing */
     337             : void print_errcontext(PariOUT *out, const char *msg, const char *s, const char *entry);
     338             : void print_prefixed_text(PariOUT *out, const char *s, const char *prefix, const char *str);
     339             : INLINE void
     340          76 : print_text(const char *s) { print_prefixed_text(pariOut, s,NULL,NULL); }
     341             : INLINE void
     342        5327 : out_print_text(PariOUT *out, const char *s) { print_prefixed_text(out, s,NULL,NULL); }
     343             : INLINE long
     344     1971233 : is_keyword_char(char c) { return (isalnum((int)c) || c=='_'); }
     345             : 
     346             : /* Interfaces (GP, etc.) */
     347             : hashtable *hash_from_link(GEN e, GEN names, int use_stack);
     348             : void gen_relink(GEN x, hashtable *table);
     349             : entree* do_alias(entree *ep);
     350             : char* get_sep(const char *t);
     351             : long get_int(const char *s, long dflt);
     352             : ulong get_uint(const char *s);
     353             : void gp_initrc(pari_stack *p_A);
     354             : 
     355             : void pari_sigint(const char *s);
     356             : void* get_stack(double fraction, long min);
     357             : void  free_graph(void);
     358             : void  initout(int initerr);
     359             : void  resetout(int initerr);
     360             : void  init_linewrap(long w);
     361             : void  print_functions_hash(const char *s);
     362             : GEN   readbin(const char *name, FILE *f, int *vector);
     363             : int   term_height(void);
     364             : int   term_width(void);
     365             : /* gp_colors */
     366             : void decode_color(long n, long *c);
     367             : 
     368             : /* defaults */
     369             : extern long precreal;
     370             : 
     371             : void lim_lines_output(char *s, long n, long max);
     372             : int tex2mail_output(GEN z, long n);
     373             : void gen_output(GEN x);
     374             : void fputGEN_pariout(GEN x, pariout_t *T, FILE *out);
     375             : 
     376             : void parsestate_reset(void);
     377             : void parsestate_save(struct pari_parsestate *state);
     378             : void parsestate_restore(struct pari_parsestate *state);
     379             : 
     380             : void compilestate_reset(void);
     381             : void compilestate_save(struct pari_compilestate *comp);
     382             : void compilestate_restore(struct pari_compilestate *comp);
     383             : 
     384             : void filestate_save(struct pari_filestate *file);
     385             : void filestate_restore(struct pari_filestate *file);
     386             : void tmp_restore(pariFILE *F);
     387             : 
     388             : long evalstate_get_trace(void);
     389             : void evalstate_set_trace(long lvl);
     390             : void evalstate_clone(void);
     391             : void evalstate_reset(void);
     392             : void evalstate_restore(struct pari_evalstate *state);
     393             : GEN  evalstate_restore_err(struct pari_evalstate *state);
     394             : void evalstate_save(struct pari_evalstate *state);
     395             : void varstate_save(struct pari_varstate *s);
     396             : void varstate_restore(struct pari_varstate *s);
     397             : 
     398             : void mtstate_save(struct pari_mtstate *s);
     399             : void mtstate_reset(void);
     400             : void mtstate_restore(struct pari_mtstate *s);
     401             : 
     402             : void debug_context(void);
     403             : 
     404             : typedef struct {
     405             :   const char *s;
     406             :   size_t ls;
     407             :   char **dir;
     408             : } forpath_t;
     409             : void forpath_init(forpath_t *T, gp_path *path, const char *s);
     410             : char *forpath_next(forpath_t *T);
     411             : 
     412             : /* GP output && output format */
     413             : void gpwritebin(const char *s, GEN x);
     414             : extern char *current_logfile;
     415             : 
     416             : /* colors */
     417             : extern long    gp_colors[];
     418             : extern int     disable_color;
     419             : 
     420             : /* entrees */
     421             : #define EpVALENCE(ep) ((ep)->valence & 0xFF)
     422             : #define EpSTATIC(ep) ((ep)->valence & 0x100)
     423             : #define EpSETSTATIC(ep) ((ep)->valence |= 0x100)
     424             : enum { EpNEW = 100, EpALIAS, EpVAR, EpINSTALL };
     425             : #define initial_value(ep) ((ep)+1)
     426             : 
     427             : /* functions lists */
     428             : extern const long functions_tblsz;  /* hashcodes table size */
     429             : extern entree **functions_hash;   /* functions hashtable */
     430             : extern entree **defaults_hash;    /* defaults hashtable */
     431             : 
     432             : /* buffers */
     433             : typedef struct Buffer {
     434             :   char *buf;
     435             :   ulong len;
     436             :   jmp_buf env;
     437             : } Buffer;
     438             : Buffer *new_buffer(void);
     439             : void delete_buffer(Buffer *b);
     440             : void fix_buffer(Buffer *b, long newlbuf);
     441             : 
     442             : typedef struct {
     443             :   const char *s; /* source */
     444             :   char *t, *end; /* target, last char read */
     445             :   int in_string, in_comment, more_input, wait_for_brace;
     446             :   Buffer *buf;
     447             : } filtre_t;
     448             : void init_filtre(filtre_t *F, Buffer *buf);
     449             : Buffer *filtered_buffer(filtre_t *F);
     450             : void kill_buffers_upto_including(Buffer *B);
     451             : void pop_buffer(void);
     452             : void kill_buffers_upto(Buffer *B);
     453             : int gp_read_line(filtre_t *F, const char *PROMPT);
     454             : void parse_key_val(char *src, char **ps, char **pt);
     455             : extern int (*cb_pari_get_line_interactive)(const char*, const char*, filtre_t *F);
     456             : extern char *(*cb_pari_fgets_interactive)(char *s, int n, FILE *f);
     457             : int get_line_from_file(const char *prompt, filtre_t *F, FILE *file);
     458             : void pari_skip_space(char **s);
     459             : void pari_skip_alpha(char **s);
     460             : char *pari_translate_string(const char *src, char *s, char *entry);
     461             : 
     462             : gp_data *default_gp_data(void);
     463             : 
     464             : typedef char *(*fgets_t)(char *, int, void*);
     465             : 
     466             : typedef struct input_method {
     467             : /* optional */
     468             :   fgets_t myfgets;  /* like libc fgets() but last argument is (void*) */
     469             : /* mandatory */
     470             :   char * (*getline)(char**, int f, struct input_method*, filtre_t *F);
     471             :   int free; /* boolean: must we free the output of getline() ? */
     472             : /* optional */
     473             :   const char *prompt, *prompt_cont;
     474             :   void *file;  /* can be used as last argument for fgets() */
     475             : } input_method;
     476             : 
     477             : int input_loop(filtre_t *F, input_method *IM);
     478             : char *file_input(char **s0, int junk, input_method *IM, filtre_t *F);
     479             : char *file_getline(Buffer *b, char **s0, input_method *IM);
     480             : 
     481             : /* readline */
     482             : typedef struct {
     483             :   /* pointers to readline variables/functions */
     484             :   char **line_buffer;
     485             :   int *point;
     486             :   int *end;
     487             :   char **(*completion_matches)(const char *, char *(*)(const char*, int));
     488             :   char *(*filename_completion_function)(const char *, int);
     489             :   char *(*username_completion_function)(const char *, int);
     490             :   int (*insert)(int, int);
     491             :   int *completion_append_character;
     492             : 
     493             :   /* PARI-specific */
     494             :   int back;  /* rewind the cursor by this number of chars */
     495             : } pari_rl_interface;
     496             : 
     497             : /* Code which wants to use readline needs to do the following:
     498             : 
     499             : #include <readline.h>
     500             : #include <paripriv.h>
     501             : pari_rl_interface pari_rl;
     502             : pari_use_readline(pari_rl);
     503             : 
     504             : This will initialize the pari_rl structure. A pointer to this structure
     505             : must be given as first argument to all PARI readline functions. */
     506             : 
     507             : /* IMPLEMENTATION NOTE: this really must be a macro (not a function),
     508             :  * since we refer to readline symbols. */
     509             : #define pari_use_readline(pari_rl) do {\
     510             :     (pari_rl).line_buffer = &rl_line_buffer; \
     511             :     (pari_rl).point = &rl_point; \
     512             :     (pari_rl).end = &rl_end; \
     513             :     (pari_rl).completion_matches = &rl_completion_matches; \
     514             :     (pari_rl).filename_completion_function = &rl_filename_completion_function; \
     515             :     (pari_rl).username_completion_function = &rl_username_completion_function; \
     516             :     (pari_rl).insert = &rl_insert; \
     517             :     (pari_rl).completion_append_character = &rl_completion_append_character; \
     518             :     (pari_rl).back = 0; } while(0)
     519             : 
     520             : /* FIXME: EXPORT AND DOCUMENT THE FOLLOWING */
     521             : 
     522             : /* PROBABLY NOT IN THE RIGHT FILE, SORT BY THEME */
     523             : 
     524             : /* multiprecision */
     525             : GEN   adduispec_offset(ulong s, GEN x, long offset, long nx);
     526             : int   lgcdii(ulong* d, ulong* d1, ulong* u, ulong* u1, ulong* v, ulong* v1, ulong vmax);
     527             : ulong rgcduu(ulong d, ulong d1, ulong vmax, ulong* u, ulong* u1, ulong* v, ulong* v1, long *s);
     528             : ulong xgcduu(ulong d, ulong d1, int f, ulong* v, ulong* v1, long *s);
     529             : ulong xxgcduu(ulong d, ulong d1, int f, ulong* u, ulong* u1, ulong* v, ulong* v1, long *s);
     530             : GEN   divgunu(GEN x, ulong i);
     531             : GEN   divrunu(GEN x, ulong i);
     532             : GEN   muliispec(GEN x, GEN y, long nx, long ny);
     533             : GEN   red_montgomery(GEN T, GEN N, ulong inv);
     534             : GEN   sqrispec(GEN x, long nx);
     535             : ulong *convi(GEN x, long *l);
     536             : 
     537             : int approx_0(GEN x, GEN y);
     538             : 
     539             : /* powers */
     540             : GEN    rpowuu(ulong a, ulong n, long prec);
     541             : 
     542             : /* floats */
     543             : double dabs(double s, double t);
     544             : double darg(double s, double t);
     545             : void   dcxlog(double s, double t, double *a, double *b);
     546             : double dnorm(double s, double t);
     547             : double dbllog2(GEN z);
     548             : 
     549             : /* hnf */
     550             : GEN hnfadd(GEN m,GEN p,GEN* ptdep,GEN* ptA,GEN* ptC,GEN extramat,GEN extraC);
     551             : GEN hnfadd_i(GEN m,GEN p,GEN* ptdep,GEN* ptA,GEN* ptC,GEN extramat,GEN extraC);
     552             : GEN hnfspec_i(GEN m,GEN p,GEN* ptdep,GEN* ptA,GEN* ptC,long k0);
     553             : GEN hnfspec(GEN m,GEN p,GEN* ptdep,GEN* ptA,GEN* ptC,long k0);
     554             : GEN mathnfspec(GEN x, GEN *ptperm, GEN *ptdep, GEN *ptB, GEN *ptC);
     555             : GEN ZM_hnfmodall_i(GEN x, GEN dm, long flag);
     556             : 
     557             : GEN LLL_check_progress(GEN Bnorm, long n0, GEN m, int final, long *ti_LLL);
     558             : 
     559             : /* integer factorization / discrete log */
     560             : ulong is_kth_power(GEN x, ulong p, GEN *pt);
     561             : GEN   mpqs(GEN N);
     562             : 
     563             : /* Polynomials */
     564             : /* a) Arithmetic/conversions */
     565             : GEN  lift_if_rational(GEN x);
     566             : GEN  monomial(GEN a, long degpol, long v);
     567             : GEN  monomialcopy(GEN a, long degpol, long v);
     568             : GEN  ser2pol_i(GEN x, long lx);
     569             : GEN  ser2rfrac_i(GEN x);
     570             : GEN  swap_vars(GEN b0, long v);
     571             : GEN  RgX_recipspec_shallow(GEN x, long l, long n);
     572             : 
     573             : /* b) Modular */
     574             : GEN  bezout_lift_fact(GEN T, GEN Tmod, GEN p, long e);
     575             : GEN  polsym_gen(GEN P, GEN y0, long n, GEN T, GEN N);
     576             : GEN  ZXQ_charpoly_sqf(GEN A, GEN B, long *lambda, long v);
     577             : GEN  ZX_disc_all(GEN,ulong);
     578             : GEN  ZX_resultant_all(GEN A, GEN B, GEN dB, ulong bound);
     579             : GEN  ZX_ZXY_resultant_all(GEN A, GEN B, long *lambda, GEN *LPRS);
     580             : 
     581             : GEN FlxqM_mul_Kronecker(GEN A, GEN B, GEN T, ulong p);
     582             : GEN FqM_mul_Kronecker(GEN x, GEN y, GEN T, GEN p);
     583             : 
     584             : /* c) factorization */
     585             : GEN chk_factors_get(GEN lt, GEN famod, GEN c, GEN T, GEN N);
     586             : long cmbf_maxK(long nb);
     587             : GEN ZX_DDF(GEN x);
     588             : GEN initgaloisborne(GEN T, GEN dn, long prec, GEN *pL, GEN *pprep, GEN *pdis);
     589             : GEN quicktrace(GEN x, GEN sym);
     590             : 
     591             : /* pari_init / pari_close */
     592             : void pari_close_compiler(void);
     593             : void pari_close_evaluator(void);
     594             : void pari_close_files(void);
     595             : void pari_close_floats(void);
     596             : void pari_close_homedir(void);
     597             : void pari_close_parser(void);
     598             : void pari_close_paths(void);
     599             : void pari_close_primes(void);
     600             : void pari_init_buffers(void);
     601             : void pari_init_compiler(void);
     602             : void pari_init_defaults(void);
     603             : void pari_init_evaluator(void);
     604             : void pari_init_files(void);
     605             : void pari_init_floats(void);
     606             : void pari_init_homedir(void);
     607             : void pari_init_graphics(void);
     608             : void pari_init_parser(void);
     609             : void pari_init_rand(void);
     610             : void pari_init_paths(void);
     611             : void pari_init_primetab(void);
     612             : void pari_init_seadata(void);
     613             : GEN pari_get_seadata(void);
     614             : void pari_set_primetab(GEN global_primetab);
     615             : void pari_set_seadata(GEN seadata);
     616             : void pari_set_varstate(long *vp, struct pari_varstate *vs);
     617             : void pari_thread_close_files(void);
     618             : 
     619             : void export_add(const char *str, GEN val);
     620             : void export_del(const char *str);
     621             : GEN  export_get(const char *str);
     622             : void exportall(void);
     623             : void unexportall(void);
     624             : 
     625             : /* BY FILES */
     626             : 
     627             : /* parinf.h */
     628             : 
     629             : GEN fincke_pohst(GEN a,GEN BOUND,long stockmax,long PREC, FP_chk_fun *CHECK);
     630             : void init_zlog(zlog_S *S, GEN bid);
     631             : GEN  log_gen_arch(zlog_S *S, long index);
     632             : GEN  log_gen_pr(zlog_S *S, long index, GEN nf, long e);
     633             : GEN  sprk_log_gen_pr(GEN nf, GEN sprk, long e);
     634             : GEN  sprk_log_prk1(GEN nf, GEN a, GEN sprk);
     635             : GEN    poltobasis(GEN nf,GEN x);
     636             : GEN    coltoalg(GEN nf,GEN x);
     637             : 
     638             : GEN    rnfdisc_get_T(GEN nf, GEN P, GEN *lim);
     639             : GEN    make_integral(GEN nf, GEN L0, GEN f, GEN listpr);
     640             : GEN    rnfallbase(GEN nf, GEN pol, GEN lim, GEN rnfeq, GEN *pD, GEN *pfi,
     641             :                   GEN *pdKP);
     642             : GEN    subgroupcondlist(GEN cyc, GEN bound, GEN listKer);
     643             : 
     644             : /* Qfb.c */
     645             : 
     646             : GEN     redimagsl2(GEN q, GEN *U);
     647             : GEN     redrealsl2(GEN V, GEN d, GEN rd);
     648             : GEN     redrealsl2step(GEN A, GEN d, GEN rd);
     649             : 
     650             : /* alglin1.c */
     651             : 
     652             : typedef long (*pivot_fun)(GEN,GEN,long,GEN);
     653             : GEN ZM_pivots(GEN x0, long *rr);
     654             : GEN RgM_pivots(GEN x0, GEN data, long *rr, pivot_fun pivot);
     655             : void RgMs_structelim_col(GEN M, long nbcol, long nbrow, GEN A, GEN *p_col, GEN *p_lin);
     656             : 
     657             : /* arith1.c */
     658             : 
     659             : int     is_gener_Fp(GEN x, GEN p, GEN p_1, GEN L);
     660             : int     is_gener_Fl(ulong x, ulong p, ulong p_1, GEN L);
     661             : 
     662             : /* arith2.c */
     663             : 
     664             : int     divisors_init(GEN n, GEN *pP, GEN *pE);
     665             : long    set_optimize(long what, GEN g);
     666             : 
     667             : /* base1.c */
     668             : 
     669             : GEN zk_galoisapplymod(GEN nf, GEN z, GEN S, GEN p);
     670             : 
     671             : /* base2.c */
     672             : 
     673             : GEN     dim1proj(GEN prh);
     674             : GEN     gen_if_principal(GEN bnf, GEN x);
     675             : 
     676             : /* base3.c */
     677             : 
     678             : void    check_nfelt(GEN x, GEN *den);
     679             : GEN     zk_ei_mul(GEN nf, GEN x, long i);
     680             : GEN     log_prk(GEN nf, GEN a, GEN sprk, GEN mod);
     681             : GEN     log_prk_units(GEN nf, GEN D, GEN sprk);
     682             : GEN     log_prk_units_init(GEN bnf);
     683             : GEN     veclog_prk(GEN nf, GEN v, GEN sprk);
     684             : GEN     log_prk_init(GEN nf, GEN pr, long k, GEN mod);
     685             : 
     686             : /* base4.c */
     687             : 
     688             : GEN     factorbackprime(GEN nf, GEN L, GEN e);
     689             : 
     690             : /* bb_group.c */
     691             : 
     692             : GEN     producttree_scheme(long n);
     693             : 
     694             : /* bern.c */
     695             : long bernbitprec(long N);
     696             : 
     697             : /* bibli2.c */
     698             : 
     699             : GEN sort_factor_pol(GEN y, int (*cmp)(GEN,GEN));
     700             : 
     701             : /* buch1.c */
     702             : 
     703             : long   bnf_increase_LIMC(long LIMC, long LIMCMAX);
     704             : 
     705             : /* buch2.c */
     706             : 
     707             : typedef struct GRHprime_t { ulong p; double logp; GEN dec; } GRHprime_t;
     708             : typedef struct GRHcheck_t { double cD, cN; GRHprime_t *primes; long clone, nprimes, maxprimes; ulong limp; forprime_t P; } GRHcheck_t;
     709             : void    free_GRHcheck(GRHcheck_t *S);
     710             : void    init_GRHcheck(GRHcheck_t *S, long N, long R1, double LOGD);
     711             : void    GRH_ensure(GRHcheck_t *S, long nb);
     712             : ulong   GRH_last_prime(GRHcheck_t *S);
     713             : int     GRHok(GRHcheck_t *S, double L, double SA, double SB);
     714             : GEN     extract_full_lattice(GEN x);
     715             : GEN     init_red_mod_units(GEN bnf, long prec);
     716             : GEN     isprincipalarch(GEN bnf, GEN col, GEN kNx, GEN e, GEN dx, long *pe);
     717             : GEN     red_mod_units(GEN col, GEN z);
     718             : 
     719             : /* buch3.c */
     720             : 
     721             : GEN     minkowski_bound(GEN D, long N, long r2, long prec);
     722             : int     subgroup_conductor_ok(GEN H, GEN L);
     723             : GEN     subgrouplist_cond_sub(GEN bnr, GEN C, GEN bound);
     724             : 
     725             : /* buch4.c */
     726             : 
     727             : GEN     nf_quadchar_modpr(GEN nf, GEN z, GEN modpr, GEN pstar);
     728             : 
     729             : /* crvwtors.c */
     730             : 
     731             : void random_curves_with_m_torsion(ulong *a4, ulong *a6, ulong *tx, ulong *ty, long ncurves, long m, ulong p);
     732             : 
     733             : /* dirichlet.c */
     734             : GEN direuler_factor(GEN s, long n);
     735             : 
     736             : /* elliptic.c */
     737             : 
     738             : void ellprint(GEN e);
     739             : GEN  elltors_psylow(GEN e, ulong p);
     740             : GEN  ellintegralbmodel(GEN e, GEN *pv);
     741             : GEN  ellQ_genreduce(GEN E, GEN G, long prec);
     742             : 
     743             : /* es.c */
     744             : 
     745             : void    killallfiles(void);
     746             : pariFILE* newfile(FILE *f, const char *name, int type);
     747             : int     popinfile(void);
     748             : pariFILE* try_pipe(const char *cmd, int flag);
     749             : 
     750             : /* F2m.c */
     751             : 
     752             : GEN     F2m_gauss_pivot(GEN x, long *rr);
     753             : GEN     F2m_gauss_sp(GEN a, GEN b);
     754             : GEN     F2m_invimage_i(GEN A, GEN B);
     755             : 
     756             : /* Fle.c */
     757             : 
     758             : void    FleV_add_pre_inplace(GEN P, GEN Q, GEN a4, ulong p, ulong pi);
     759             : void    FleV_dbl_pre_inplace(GEN P, GEN a4, ulong p, ulong pi);
     760             : void    FleV_mulu_pre_inplace(GEN P, ulong n, GEN a4, ulong p, ulong pi);
     761             : void    FleV_sub_pre_inplace(GEN P, GEN Q, GEN a4, ulong p, ulong pi);
     762             : 
     763             : /* Flv.c */
     764             : 
     765             : GEN     Flm_gauss_sp(GEN a, GEN b, ulong *detp, ulong p);
     766             : GEN     Flm_invimage_i(GEN A, GEN B, ulong p);
     767             : GEN     Flm_inv_sp(GEN a, ulong *detp, ulong p);
     768             : GEN     Flm_pivots(GEN x, ulong p, long *rr, long inplace);
     769             : 
     770             : /* Flxq_log.c */
     771             : 
     772             : GEN Flxq_log_index(GEN a0, GEN b0, GEN m, GEN T0, ulong p);
     773             : int Flxq_log_use_index(GEN m, GEN T0, ulong p);
     774             : 
     775             : /* FlxqE.c */
     776             : 
     777             : GEN     ZpXQ_norm_pcyc(GEN x, GEN T, GEN q, GEN p);
     778             : long    zx_is_pcyc(GEN T);
     779             : 
     780             : /* FpV.c */
     781             : 
     782             : GEN FpMs_leftkernel_elt_col(GEN M, long nbcol, long nbrow, GEN p);
     783             : GEN FpX_to_mod_raw(GEN z, GEN p);
     784             : 
     785             : /* FpX.c */
     786             : 
     787             : GEN     ZlXQXn_expint(GEN h, long e, GEN T, GEN p, ulong pp);
     788             : 
     789             : /* FpX_factor.c */
     790             : 
     791             : GEN     ddf_to_ddf2(GEN V);
     792             : long    ddf_to_nbfact(GEN D);
     793             : GEN     vddf_to_simplefact(GEN V, long d);
     794             : 
     795             : /* FpXQX_factor.c */
     796             : 
     797             : GEN     FpXQX_factor_Berlekamp(GEN x, GEN T, GEN p);
     798             : 
     799             : /* forprime.c*/
     800             : 
     801             : void    init_modular_big(forprime_t *S);
     802             : void    init_modular_small(forprime_t *S);
     803             : 
     804             : /* galconj.c */
     805             : 
     806             : GEN     galoiscosets(GEN O, GEN perm);
     807             : GEN     matrixnorm(GEN M, long prec);
     808             : 
     809             : /* gen1.c */
     810             : 
     811             : GEN     gred_rfrac_simple(GEN n, GEN d);
     812             : GEN     sqr_ser_part(GEN x, long l1, long l2);
     813             : 
     814             : /* hash.c */
     815             : 
     816             : hashtable *hashstr_import_static(hashentry *e, ulong size);
     817             : 
     818             : /* hyperell.c */
     819             : 
     820             : GEN     ZlXQX_hyperellpadicfrobenius(GEN H, GEN T, ulong p, long n);
     821             : GEN     hyperell_redsl2(GEN Q);
     822             : 
     823             : /* ifactor1.c */
     824             : 
     825             : ulong snextpr(ulong p, byteptr *d, long *rcn, long *q, int (*ispsp)(ulong));
     826             : 
     827             : /* intnum.c */
     828             : 
     829             : GEN     contfraceval_inv(GEN CF, GEN tinv, long nlim);
     830             : 
     831             : /* mftrace.c */
     832             : 
     833             : void pari_close_mf(void);
     834             : long polishomogeneous(GEN P);
     835             : GEN sertocol(GEN S);
     836             : 
     837             : /* prime.c */
     838             : 
     839             : long    BPSW_psp_nosmalldiv(GEN N);
     840             : int     MR_Jaeschke(GEN n);
     841             : long    isanypower_nosmalldiv(GEN N, GEN *px);
     842             : void    prime_table_next_p(ulong a, byteptr *pd, ulong *pp, ulong *pn);
     843             : 
     844             : /* perm.c */
     845             : 
     846             : long    cosets_perm_search(GEN C, GEN p);
     847             : GEN     perm_generate(GEN S, GEN H, long o);
     848             : long    perm_relorder(GEN p, GEN S);
     849             : GEN     vecperm_extendschreier(GEN C, GEN v, long n);
     850             : 
     851             : /* polclass.c */
     852             : 
     853             : GEN polclass0(long D, long inv, long xvar, GEN *db);
     854             : 
     855             : /* polmodular.c */
     856             : 
     857             : GEN polmodular0_ZM(long L, long inv, GEN J, GEN Q, int compute_derivs, GEN *db);
     858             : GEN Flm_Fl_polmodular_evalx(GEN phi, long L, ulong j, ulong p, ulong pi);
     859             : GEN polmodular_db_init(long inv);
     860             : void polmodular_db_clear(GEN db);
     861             : void polmodular_db_add_level(GEN *db, long L, long inv);
     862             : void polmodular_db_add_levels(GEN *db, long *levels, long k, long inv);
     863             : GEN polmodular_db_for_inv(GEN db, long inv);
     864             : GEN polmodular_db_getp(GEN fdb, long L, ulong p);
     865             : 
     866             : long modinv_level(long inv);
     867             : long modinv_degree(long *p1, long *p2, long inv);
     868             : long modinv_ramified(long D, long inv);
     869             : long modinv_j_from_2double_eta(GEN F, long inv, ulong x0, ulong x1, ulong p, ulong pi);
     870             : GEN double_eta_raw(long inv);
     871             : ulong modfn_root(ulong j, norm_eqn_t ne, long inv);
     872             : long modfn_unambiguous_root(ulong *r, long inv, ulong j0, norm_eqn_t ne, GEN jdb);
     873             : GEN qfb_nform(long D, long n);
     874             : 
     875             : /* Fle.c */
     876             : 
     877             : ulong   Flj_order_ufact(GEN P, ulong n, GEN F, ulong a4, ulong p, ulong pi);
     878             : 
     879             : /* polarit3.c */
     880             : 
     881             : GEN     Flm_Frobenius_pow(GEN M, long d, GEN T, ulong p);
     882             : GEN     FpM_Frobenius_pow(GEN M, long d, GEN T, GEN p);
     883             : GEN     FpX_compositum(GEN A, GEN B, GEN p);
     884             : GEN     Flx_direct_compositum(GEN A, GEN B, ulong p);
     885             : GEN     FlxV_direct_compositum(GEN V, ulong p);
     886             : GEN     FlxqX_direct_compositum(GEN P, GEN Q, GEN T, ulong p);
     887             : GEN     FpX_direct_compositum(GEN A, GEN B, GEN p);
     888             : GEN     FpXV_direct_compositum(GEN V, GEN p);
     889             : GEN     nf_direct_compositum(GEN nf, GEN A, GEN B);
     890             : ulong   ZX_ZXY_ResBound(GEN A, GEN B, GEN dB);
     891             : GEN     ffinit_Artin_Schreier(ulong p, long l);
     892             : GEN     ffinit_rand(GEN p, long n);
     893             : 
     894             : /* readline.c */
     895             : 
     896             : char**  pari_completion(pari_rl_interface *pari_rl, char *text, int START, int END);
     897             : char**  pari_completion_matches(pari_rl_interface *pari_rl, const char *s, long pos, long *wordpos);
     898             : 
     899             : /* RgX.c */
     900             : 
     901             : GEN     RgX_homogenous_evalpow(GEN P, GEN A, GEN B);
     902             : GEN     QXQX_homogenous_evalpow(GEN P, GEN A, GEN B, GEN T);
     903             : 
     904             : /* subcyclo.c */
     905             : 
     906             : GEN     galoiscyclo(long n, long v);
     907             : GEN     znstar_bits(long n, GEN H);
     908             : long    znstar_conductor(GEN H);
     909             : long    znstar_conductor_bits(GEN bits);
     910             : GEN     znstar_cosets(long n, long phi_n, GEN H);
     911             : GEN     znstar_elts(long n, GEN H);
     912             : GEN     znstar_generate(long n, GEN V);
     913             : GEN     znstar_hnf(GEN Z, GEN M);
     914             : GEN     znstar_hnf_elts(GEN Z, GEN H);
     915             : GEN     znstar_hnf_generators(GEN Z, GEN M);
     916             : GEN     znstar_reduce_modulus(GEN H, long n);
     917             : GEN     znstar_small(GEN zn);
     918             : 
     919             : /* trans1.c */
     920             : 
     921             : struct abpq { GEN *a, *b, *p, *q; };
     922             : struct abpq_res { GEN P, Q, B, T; };
     923             : void    abpq_init(struct abpq *A, long n);
     924             : void    abpq_sum(struct abpq_res *r, long n1, long n2, struct abpq *A);
     925             : GEN     logagmcx(GEN q, long prec);
     926             : GEN     zellagmcx(GEN a0, GEN b0, GEN r, GEN t, long prec);
     927             : 
     928             : /* trans2.c */
     929             : 
     930             : GEN     trans_fix_arg(long *prec, GEN *s0, GEN *sig, GEN *tau, pari_sp *av, GEN *res);
     931             : 
     932             : /* trans3.c */
     933             : 
     934             : GEN     double_eta_quotient(GEN a, GEN w, GEN D, long p, long q, GEN pq, GEN sqrtD);
     935             : GEN     inv_szeta_euler(long n, long prec);
     936             : 
     937             : /* volcano.c */
     938             : 
     939             : long j_level_in_volcano(GEN phi, ulong j, ulong p, ulong pi, long L, long depth);
     940             : ulong ascend_volcano(GEN phi, ulong j, ulong p, ulong pi, long level, long L, long depth, long steps);
     941             : ulong descend_volcano(GEN phi, ulong j, ulong p, ulong pi, long level, long L, long depth, long steps);
     942             : long next_surface_nbr(ulong *nJ, GEN phi, long L, long h, ulong J, const ulong *pJ, ulong p, ulong pi);
     943             : GEN enum_roots(ulong j, norm_eqn_t ne, GEN fdb, classgp_pcp_t G);
     944             : 
     945             : ENDEXTERN

Generated by: LCOV version 1.13