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

Generated by: LCOV version 1.13