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.16.2 lcov report (development 29401-b333f5c7d5) Lines: 7 7 100.0 %
Date: 2024-06-19 09:03:24 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 both, 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(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(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_break_recover(void);
     163             : void mt_export_add(const char *str, GEN val);
     164             : void mt_export_del(const char *str);
     165             : void mt_init_stack(size_t s);
     166             : int  mt_is_thread(void);
     167             : void mt_thread_init(void);
     168             : 
     169             : GEN  eisker_worker(GEN Ei, GEN M, GEN D, GEN co, GEN CD);
     170             : GEN  pareval_worker(GEN code);
     171             : void parfor0(GEN a, GEN b, GEN code, GEN code2);
     172             : void parforstep0(GEN a, GEN b, GEN s, GEN code, GEN code2);
     173             : GEN  parfor_worker(GEN i, GEN C);
     174             : void parforeach0(GEN x, GEN code, GEN code2);
     175             : void parforprime0(GEN a, GEN b, GEN code, GEN code2);
     176             : void parforprimestep0(GEN a, GEN b, GEN q, GEN code, GEN code2);
     177             : void parforvec0(GEN a, GEN code, GEN code2, long flag);
     178             : GEN  parvector_worker(GEN i, GEN C);
     179             : GEN  polmodular_worker(GEN pt, ulong L, GEN hilb, GEN factu,
     180             :        GEN vne, GEN vinfo, long compute_derivs, GEN j_powers, GEN G_surface,
     181             :        GEN G_floor, GEN fdb);
     182             : GEN  polclass_worker(GEN p, GEN G, GEN db);
     183             : GEN  nf_L2_bound(GEN nf, GEN den, GEN *pL);
     184             : GEN  nmV_polint_center_tree_worker(GEN Va, GEN T, GEN R, GEN xa, GEN m2);
     185             : GEN  nmV_chinese_center_tree_seq(GEN A, GEN P, GEN T, GEN R);
     186             : GEN  nxMV_polint_center_tree_worker(GEN Va, GEN T, GEN R, GEN xa, GEN m2);
     187             : GEN  nxMV_chinese_center_tree_seq(GEN A, GEN P, GEN T, GEN R);
     188             : GEN  F2xq_log_Coppersmith_worker(GEN u, long i, GEN V, GEN R);
     189             : GEN  Flxq_log_Coppersmith_worker(GEN u, long i, GEN V, GEN R);
     190             : GEN  Fp_log_sieve_worker(long a, long prmax, GEN C, GEN c, GEN Ci, GEN ci, GEN pr, GEN sz);
     191             : GEN  QM_charpoly_ZX_worker(GEN P, GEN M, GEN dM);
     192             : GEN  QXQ_div_worker(GEN P, GEN A, GEN B, GEN C);
     193             : GEN  QXQ_inv_worker(GEN P, GEN A, GEN B);
     194             : GEN  RgM_ZM_mul_worker(GEN y, GEN x);
     195             : GEN  ZX_resultant_worker(GEN P, GEN A, GEN B, GEN dB);
     196             : GEN  ZXQX_resultant_worker(GEN P, GEN A, GEN B, GEN T, GEN dB);
     197             : GEN  ZX_ZXY_resultant_worker(GEN P, GEN A, GEN B, GEN dB, GEN v);
     198             : GEN  ZX_composedsum_worker(GEN P, GEN A, GEN B);
     199             : GEN  ZXQX_composedsum_worker(GEN P, GEN A, GEN B, GEN C);
     200             : GEN  ZX_gcd_worker(GEN P, GEN A, GEN B, GEN g);
     201             : GEN  ZXQ_minpoly_worker(GEN P, GEN A, GEN B, long d);
     202             : GEN  ZM_det_worker(GEN P, GEN A);
     203             : GEN  ZM_inv_worker(GEN P, GEN A);
     204             : GEN  ZM_ker_worker(GEN P, GEN A);
     205             : GEN  ZM_mul_worker(GEN P, GEN A, GEN B);
     206             : GEN  ZM_gauss_worker(GEN P, GEN A, GEN B);
     207             : GEN  ZabM_inv_worker(GEN P, GEN A, GEN Q);
     208             : GEN  aprcl_step4_worker(ulong q, GEN pC, GEN N, GEN v);
     209             : GEN  aprcl_step6_worker(GEN r, long t, GEN N, GEN N1, GEN et);
     210             : GEN  ecpp_sqrt_worker(GEN g, GEN N, GEN p);
     211             : GEN  ecpp_ispsp_worker(GEN N);
     212             : GEN  ecpp_step2_worker(GEN S, GEN HD, GEN primelist, long dbg);
     213             : GEN  primecertisvalid_ecpp_worker(GEN certi);
     214             : GEN  lfuninit_worker(long r, GEN K, GEN L, GEN peh2d, GEN vroots, GEN dr, GEN di, GEN an, GEN bn);
     215             : GEN  lfuninit_theta2_worker(long r, GEN L, GEN qk, GEN a, GEN di, GEN an, GEN bn);
     216             : GEN  gen_parapply(GEN worker, GEN D);
     217             : GEN  gen_parapply_percent(GEN worker, GEN D, long percent);
     218             : GEN  parapply_slice_worker(GEN worker, GEN D);
     219             : GEN  gen_parapply_slice(GEN worker, GEN D, long mmin);
     220             : GEN  gen_crt(const char *str, GEN worker, forprime_t *S, GEN dB, ulong bound, long mmin, GEN *pt_mod,
     221             :              GEN crt(GEN, GEN, GEN*), GEN center(GEN, GEN, GEN));
     222             : void gen_inccrt(const char *str, GEN worker, GEN dB, long n, long mmin,
     223             :            forprime_t *S, GEN *pt_H, GEN *pt_mod, GEN crt(GEN, GEN, GEN*),
     224             :            GEN center(GEN, GEN, GEN));
     225             : void gen_inccrt_i(const char *str, GEN worker, GEN dB, long n, long mmin,
     226             :            forprime_t *S, GEN *pH, GEN *pmod, GEN crt(GEN, GEN, GEN*),
     227             :            GEN center(GEN, GEN, GEN));
     228             : GEN  direllnf_worker(GEN P, ulong X, GEN E);
     229             : GEN  dirartin_worker(GEN P, ulong X, GEN nf, GEN G, GEN V, GEN aut);
     230             : GEN  direllsympow_worker(GEN P, ulong X, GEN E, ulong m);
     231             : GEN  dirgenus2_worker(GEN P, ulong X, GEN Q);
     232             : GEN  dirhgm_worker(GEN P, ulong X, GEN hgm, GEN t);
     233             : GEN  pardireuler(GEN worker, GEN a, GEN b, GEN c, GEN Sbad);
     234             : GEN  FpM_ratlift_worker(GEN A, GEN mod, GEN B);
     235             : GEN  ellQ_factorback_worker(GEN P, GEN E, GEN A, GEN L, ulong l);
     236             : GEN  chinese_unit_worker(GEN P, GEN A, GEN U, GEN B, GEN D, GEN C);
     237             : GEN  partmap_reverse_frac_worker(GEN t, GEN a, GEN b, GEN la, GEN lb, long v);
     238             : GEN  parsum_slice_worker(GEN a, GEN b, GEN m, GEN worker);
     239             : 
     240             : /* Relative number fields */
     241             : enum { rnf_NFABS = 1, rnf_MAPS };
     242             : 
     243             : /* Finite fields */
     244             : enum { t_FF_FpXQ = 0, t_FF_Flxq = 1, t_FF_F2xq = 2 };
     245             : GEN FF_ellinit(GEN E, GEN fg);
     246             : GEN FF_elldata(GEN E, GEN fg);
     247             : 
     248             : /* L functions */
     249             : enum { t_LFUN_GENERIC, t_LFUN_ZETA, t_LFUN_NF, t_LFUN_ELL, t_LFUN_KRONECKER,
     250             :        t_LFUN_CHIZ, t_LFUN_CHIGEN, t_LFUN_ETA,
     251             :        t_LFUN_DIV, t_LFUN_MUL, t_LFUN_CONJ,
     252             :        t_LFUN_SYMPOW_ELL, t_LFUN_QF, t_LFUN_ARTIN, t_LFUN_MFCLOS,
     253             :        t_LFUN_GENUS2, t_LFUN_TWIST, t_LFUN_CLOSURE0, t_LFUN_SHIFT,
     254             :        t_LFUN_HGM, t_LFUN_HECKE,t_LFUN_ABELREL};
     255             : enum { t_LDESC_INIT, t_LDESC_THETA, t_LDESC_PRODUCT };
     256             : 
     257             : /* Elliptic curves */
     258             : /* common to Q and Rg */
     259             : enum { R_PERIODS = 1, R_ETA, R_ROOTS, R_AB };
     260             : 
     261             : enum { Qp_ROOT = 1, Qp_TATE };
     262             : enum { Q_GROUPGEN = 5, Q_GLOBALRED, Q_ROOTNO, Q_MINIMALMODEL };
     263             : enum { NF_MINIMALMODEL = 1, NF_GLOBALRED, NF_MINIMALPRIMES, NF_ROOTNO, NF_NF };
     264             : 
     265             : /* common to Fp and Fq */
     266             : enum { FF_CARD = 1, FF_GROUP, FF_GROUPGEN, FF_O };
     267             : 
     268             : /* for Buchall_param */
     269             : enum { fupb_NONE = 0, fupb_RELAT, fupb_LARGE, fupb_PRECI };
     270             : 
     271             : /* Represents the data in the equation(s)
     272             :  *   4p = t^2 - v^2 D = t^2 - v^2 u^2 D_K = w^2 D_K.
     273             :  * t is the absolute trace, so always > 0.
     274             :  * T is a twisting parameter, which satisfies (T|p) == -1. */
     275             : typedef struct {
     276             :   GEN faw; /* factor(u*v) */
     277             :   long D, t, u, v;
     278             :   ulong p, pi, s2, T;
     279             : } norm_eqn_struct;
     280             : typedef norm_eqn_struct norm_eqn_t[1];
     281             : void norm_eqn_set(norm_eqn_t ne, long D,long t,long u,long v,GEN faw,ulong p);
     282             : 
     283             : #define zv_to_longptr(v) (&((v)[1]))
     284             : #define zv_to_ulongptr(v) ((ulong *)&((v)[1]))
     285             : 
     286             : /* Modular invariants */
     287             : #define INV_J       0
     288             : #define INV_F       1
     289             : #define INV_F2      2
     290             : #define INV_F3      3
     291             : #define INV_F4      4
     292             : #define INV_G2      5
     293             : #define INV_W2W3    6
     294             : #define INV_F8      8
     295             : #define INV_W3W3    9
     296             : #define INV_W2W5    10
     297             : #define INV_W2W7    14
     298             : #define INV_W3W5    15
     299             : #define INV_W3W7    21
     300             : #define INV_W2W3E2  23
     301             : #define INV_W2W5E2  24
     302             : #define INV_W2W13   26
     303             : #define INV_W2W7E2  27
     304             : #define INV_W3W3E2  28
     305             : #define INV_W5W7    35
     306             : #define INV_W3W13   39
     307             : 
     308             : /* Get coefficient of x^d in f, assuming f is nonzero. */
     309    16910686 : INLINE ulong Flx_coeff(GEN f, long d) { return f[d + 2]; }
     310             : /* Return the root of f, assuming deg(f) = 1. */
     311      295155 : INLINE ulong Flx_deg1_root(GEN f, ulong p) {
     312      295155 :   if (degpol(f) != 1) pari_err_BUG("Flx_deg1_root");
     313      295148 :   return Fl_div(Fl_neg(Flx_coeff(f, 0), p), Flx_coeff(f, 1), p);
     314             : }
     315             : 
     316             : /* Allocation / gerepile */
     317             : long   getdebugvar(void);
     318             : void   setdebugvar(long n);
     319             : void   debug_stack(void);
     320             : void   minim_alloc(long n, double ***q, GEN *x, double **y,  double **z, double **v);
     321             : int    pop_entree_block(entree *ep, long loc);
     322             : int    pop_val_if_newer(entree *ep, long loc);
     323             : 
     324             : /* general printing */
     325             : void print_errcontext(PariOUT *out, const char *msg, const char *s, const char *entry);
     326             : void print_prefixed_text(PariOUT *out, const char *s, const char *prefix, const char *str);
     327             : INLINE void
     328          76 : print_text(const char *s) { print_prefixed_text(pariOut, s,NULL,NULL); }
     329             : INLINE void
     330        5327 : out_print_text(PariOUT *out, const char *s) { print_prefixed_text(out, s,NULL,NULL); }
     331             : INLINE long
     332     2430302 : is_keyword_char(char c) { return (isalnum((unsigned char)c) || c=='_'); }
     333             : 
     334             : /* Interfaces (GP, etc.) */
     335             : hashtable *hash_from_link(GEN e, GEN names, int use_stack);
     336             : void gen_relink(GEN x, hashtable *table);
     337             : entree* do_alias(entree *ep);
     338             : char* get_sep(const char *t);
     339             : long get_int(const char *s, long dflt);
     340             : void gp_initrc(pari_stack *p_A);
     341             : 
     342             : void pari_sigint(const char *s);
     343             : void* get_stack(double fraction, long min);
     344             : void  free_graph(void);
     345             : void  initout(int initerr);
     346             : void  resetout(int initerr);
     347             : void  init_linewrap(long w);
     348             : void  print_functions_hash(const char *s);
     349             : GEN   readbin(const char *name, FILE *f, int *vector);
     350             : int   term_height(void);
     351             : int   term_width(void);
     352             : /* gp_colors */
     353             : void decode_color(long n, long *c);
     354             : 
     355             : /* defaults */
     356             : extern long precreal;
     357             : 
     358             : void gen_output(GEN x);
     359             : void fputGEN_pariout(GEN x, pariout_t *T, FILE *out);
     360             : 
     361             : void parsestate_reset(void);
     362             : void parsestate_save(struct pari_parsestate *state);
     363             : void parsestate_restore(struct pari_parsestate *state);
     364             : 
     365             : void compilestate_reset(void);
     366             : void compilestate_save(struct pari_compilestate *comp);
     367             : void compilestate_restore(struct pari_compilestate *comp);
     368             : 
     369             : void filestate_save(struct pari_filestate *file);
     370             : void filestate_restore(struct pari_filestate *file);
     371             : void tmp_restore(pariFILE *F);
     372             : 
     373             : long evalstate_get_trace(void);
     374             : void evalstate_set_trace(long lvl);
     375             : void evalstate_clone(void);
     376             : void evalstate_reset(void);
     377             : void evalstate_restore(struct pari_evalstate *state);
     378             : GEN  evalstate_restore_err(struct pari_evalstate *state);
     379             : void evalstate_save(struct pari_evalstate *state);
     380             : void varstate_save(struct pari_varstate *s);
     381             : void varstate_restore(struct pari_varstate *s);
     382             : 
     383             : void mtstate_save(struct pari_mtstate *s);
     384             : void mtstate_reset(void);
     385             : void mtstate_restore(struct pari_mtstate *s);
     386             : 
     387             : void debug_context(void);
     388             : 
     389             : typedef struct {
     390             :   const char *s;
     391             :   size_t ls;
     392             :   char **dir;
     393             : } forpath_t;
     394             : void forpath_init(forpath_t *T, gp_path *path, const char *s);
     395             : char *forpath_next(forpath_t *T);
     396             : 
     397             : /* GP output && output format */
     398             : void gpwritebin(const char *s, GEN x);
     399             : extern char *current_logfile;
     400             : 
     401             : /* colors */
     402             : extern long    gp_colors[];
     403             : extern int     disable_color;
     404             : 
     405             : /* entrees */
     406             : #define EpVALENCE(ep) ((ep)->valence & 0xFF)
     407             : #define EpSTATIC(ep) ((ep)->valence & 0x100)
     408             : #define EpSETSTATIC(ep) ((ep)->valence |= 0x100)
     409             : enum { EpNEW = 100, EpALIAS, EpVAR, EpINSTALL };
     410             : #define initial_value(ep) ((ep)+1)
     411             : 
     412             : /* functions lists */
     413             : extern const long functions_tblsz;  /* hashcodes table size */
     414             : extern entree **functions_hash;   /* functions hashtable */
     415             : extern entree **defaults_hash;    /* defaults hashtable */
     416             : 
     417             : /* buffers */
     418             : typedef struct Buffer {
     419             :   char *buf;
     420             :   ulong len;
     421             :   jmp_buf env;
     422             : } Buffer;
     423             : Buffer *new_buffer(void);
     424             : void delete_buffer(Buffer *b);
     425             : void fix_buffer(Buffer *b, long newlbuf);
     426             : 
     427             : typedef struct {
     428             :   const char *s; /* source */
     429             :   char *t, *end; /* target, last char read */
     430             :   int in_string, in_comment, more_input, wait_for_brace;
     431             :   Buffer *buf;
     432             : } filtre_t;
     433             : void init_filtre(filtre_t *F, Buffer *buf);
     434             : Buffer *filtered_buffer(filtre_t *F);
     435             : void kill_buffers_upto_including(Buffer *B);
     436             : void pop_buffer(void);
     437             : void kill_buffers_upto(Buffer *B);
     438             : int gp_read_line(filtre_t *F, const char *PROMPT);
     439             : void parse_key_val(char *src, char **ps, char **pt);
     440             : extern int (*cb_pari_get_line_interactive)(const char*, const char*, filtre_t *F);
     441             : extern char *(*cb_pari_fgets_interactive)(char *s, int n, FILE *f);
     442             : int get_line_from_file(const char *prompt, filtre_t *F, FILE *file);
     443             : void pari_skip_space(char **s);
     444             : void pari_skip_alpha(char **s);
     445             : char *pari_translate_string(const char *src, char *s, char *entry);
     446             : 
     447             : gp_data *default_gp_data(void);
     448             : 
     449             : typedef char *(*fgets_t)(char *, int, void*);
     450             : 
     451             : typedef struct input_method {
     452             : /* optional */
     453             :   fgets_t myfgets;  /* like libc fgets() but last argument is (void*) */
     454             : /* mandatory */
     455             :   char * (*getline)(char**, int f, struct input_method*, filtre_t *F);
     456             :   int free; /* boolean: must we free the output of getline() ? */
     457             : /* optional */
     458             :   const char *prompt, *prompt_cont;
     459             :   void *file;  /* can be used as last argument for fgets() */
     460             : } input_method;
     461             : 
     462             : int input_loop(filtre_t *F, input_method *IM);
     463             : char *file_input(char **s0, int junk, input_method *IM, filtre_t *F);
     464             : char *file_getline(Buffer *b, char **s0, input_method *IM);
     465             : 
     466             : /* readline */
     467             : typedef struct {
     468             :   /* pointers to readline variables/functions */
     469             :   char **line_buffer;
     470             :   int *point;
     471             :   int *end;
     472             :   char **(*completion_matches)(const char *, char *(*)(const char*, int));
     473             :   char *(*filename_completion_function)(const char *, int);
     474             :   char *(*username_completion_function)(const char *, int);
     475             :   int (*insert)(int, int);
     476             :   int *completion_append_character;
     477             : 
     478             :   /* PARI-specific */
     479             :   int back;  /* rewind the cursor by this number of chars */
     480             : } pari_rl_interface;
     481             : 
     482             : /* Code which wants to use readline needs to do the following:
     483             : 
     484             : #include <readline/readline.h>
     485             : #include <pari/paripriv.h>
     486             : pari_rl_interface pari_rl;
     487             : pari_use_readline(pari_rl);
     488             : 
     489             : This will initialize the pari_rl structure. A pointer to this structure
     490             : must be given as first argument to all PARI readline functions. */
     491             : 
     492             : /* IMPLEMENTATION NOTE: this really must be a macro (not a function),
     493             :  * since we refer to readline symbols. */
     494             : #define pari_use_readline(pari_rl) do {\
     495             :     (pari_rl).line_buffer = &rl_line_buffer; \
     496             :     (pari_rl).point = &rl_point; \
     497             :     (pari_rl).end = &rl_end; \
     498             :     (pari_rl).completion_matches = &rl_completion_matches; \
     499             :     (pari_rl).filename_completion_function = &rl_filename_completion_function; \
     500             :     (pari_rl).username_completion_function = &rl_username_completion_function; \
     501             :     (pari_rl).insert = &rl_insert; \
     502             :     (pari_rl).completion_append_character = &rl_completion_append_character; \
     503             :     (pari_rl).back = 0; } while(0)
     504             : 
     505             : /* FIXME: EXPORT AND DOCUMENT THE FOLLOWING */
     506             : 
     507             : /* PROBABLY NOT IN THE RIGHT FILE, SORT BY THEME */
     508             : 
     509             : /* multiprecision */
     510             : GEN   adduispec_offset(ulong s, GEN x, long offset, long nx);
     511             : int   lgcdii(ulong* d, ulong* d1, ulong* u, ulong* u1, ulong* v, ulong* v1, ulong vmax);
     512             : ulong rgcduu(ulong d, ulong d1, ulong vmax, ulong* u, ulong* u1, ulong* v, ulong* v1, long *s);
     513             : ulong xgcduu(ulong d, ulong d1, int f, ulong* v, ulong* v1, long *s);
     514             : ulong xxgcduu(ulong d, ulong d1, int f, ulong* u, ulong* u1, ulong* v, ulong* v1, long *s);
     515             : GEN   muliispec(GEN x, GEN y, long nx, long ny);
     516             : GEN   red_montgomery(GEN T, GEN N, ulong inv);
     517             : GEN   sqrispec(GEN x, long nx);
     518             : ulong *convi(GEN x, long *l);
     519             : 
     520             : /* powers */
     521             : GEN    rpowuu(ulong a, ulong n, long prec);
     522             : 
     523             : /* floats */
     524             : double dabs(double s, double t);
     525             : double darg(double s, double t);
     526             : void   dcxlog(double s, double t, double *a, double *b);
     527             : double dnorm(double s, double t);
     528             : double dbllog2(GEN z);
     529             : double dbllambertW0(double a);
     530             : double dbllambertW_1(double a);
     531             : 
     532             : /* hnf */
     533             : GEN hnfadd(GEN m,GEN p,GEN* ptdep,GEN* ptA,GEN* ptC,GEN extramat,GEN extraC);
     534             : GEN hnfadd_i(GEN m,GEN p,GEN* ptdep,GEN* ptA,GEN* ptC,GEN extramat,GEN extraC);
     535             : GEN hnfspec_i(GEN m,GEN p,GEN* ptdep,GEN* ptA,GEN* ptC,long k0);
     536             : GEN hnfspec(GEN m,GEN p,GEN* ptdep,GEN* ptA,GEN* ptC,long k0);
     537             : GEN mathnfspec(GEN x, GEN *ptperm, GEN *ptdep, GEN *ptB, GEN *ptC);
     538             : GEN ZM_hnfmodall_i(GEN x, GEN dm, long flag);
     539             : 
     540             : GEN LLL_check_progress(GEN Bnorm, long n0, GEN m, int final, long *ti_LLL);
     541             : 
     542             : /* integer factorization / discrete log */
     543             : ulong is_kth_power(GEN x, ulong p, GEN *pt);
     544             : GEN   mpqs(GEN N);
     545             : 
     546             : /* Polynomials */
     547             : /* a) Arithmetic/conversions */
     548             : GEN  lift_if_rational(GEN x);
     549             : GEN  monomial(GEN a, long degpol, long v);
     550             : GEN  monomialcopy(GEN a, long degpol, long v);
     551             : GEN  ser2pol_i(GEN x, long lx);
     552             : GEN  ser2pol_i_normalize(GEN x, long l, long *v);
     553             : GEN  ser2rfrac_i(GEN x);
     554             : GEN  swap_vars(GEN b0, long v);
     555             : GEN  RgX_recipspec_shallow(GEN x, long l, long n);
     556             : 
     557             : /* b) Modular */
     558             : GEN  bezout_lift_fact(GEN T, GEN Tmod, GEN p, long e);
     559             : GEN  polsym_gen(GEN P, GEN y0, long n, GEN T, GEN N);
     560             : GEN  ZXQ_charpoly_sqf(GEN A, GEN B, long *lambda, long v);
     561             : GEN  ZX_disc_all(GEN,ulong);
     562             : GEN  ZX_resultant_all(GEN A, GEN B, GEN dB, ulong bound);
     563             : GEN  ZX_ZXY_resultant_all(GEN A, GEN B, long *lambda, GEN *LPRS);
     564             : 
     565             : GEN FlxqM_mul_Kronecker(GEN A, GEN B, GEN T, ulong p);
     566             : GEN FqM_mul_Kronecker(GEN x, GEN y, GEN T, GEN p);
     567             : 
     568             : /* c) factorization */
     569             : GEN chk_factors_get(GEN lt, GEN famod, GEN c, GEN T, GEN N);
     570             : long cmbf_maxK(long nb);
     571             : GEN ZX_DDF(GEN x);
     572             : GEN ZX_DDF_max(GEN x, long dmax);
     573             : GEN initgaloisborne(GEN T, GEN dn, long prec, GEN *pL, GEN *pprep, GEN *pdis);
     574             : 
     575             : /* number fields */
     576             : GEN nflist_C3_worker(GEN gv, GEN T);
     577             : GEN nflist_C4vec_worker(GEN gm, GEN X, GEN Xinf, GEN gs);
     578             : GEN nflist_V4_worker(GEN D1, GEN X, GEN Xinf, GEN gs);
     579             : GEN nflist_D4_worker(GEN D, GEN X, GEN Xinf, GEN listarch);
     580             : GEN nflist_A4S4_worker(GEN P3, GEN X, GEN Xinf, GEN cards);
     581             : GEN nflist_C5_worker(GEN N, GEN bnfC5);
     582             : GEN nflist_CL_worker(GEN Fcond, GEN bnf, GEN ellprec);
     583             : GEN nflist_DL_worker(GEN P2, GEN X1pow, GEN X0pow, GEN X, GEN Xinf, GEN ells);
     584             : GEN nflist_Mgen_worker(GEN field, GEN X, GEN Xinf, GEN ella);
     585             : GEN nflist_C6_worker(GEN P3, GEN X, GEN Xinf, GEN M, GEN T);
     586             : GEN nflist_D612_worker(GEN P3, GEN X, GEN Xinf, GEN limd2s2);
     587             : GEN nflist_A46S46P_worker(GEN P3, GEN Xinf, GEN sqX, GEN cards);
     588             : GEN nflist_S46M_worker(GEN P3, GEN X, GEN Xinf, GEN gs);
     589             : GEN nflist_A462_worker(GEN P3, GEN X, GEN Xinf, GEN listarch, GEN GAL);
     590             : GEN nflist_S3C3_worker(GEN D2, GEN X, GEN Xinf);
     591             : GEN nflist_S462_worker(GEN P3, GEN X, GEN Xinf, GEN listarch13, GEN GAL);
     592             : GEN nflist_S36_worker(GEN pol, GEN X, GEN Xinf);
     593             : GEN nflist_C32C4_worker(GEN P4, GEN X, GEN Xinf, GEN GAL);
     594             : GEN nflist_C32D4_worker(GEN P, GEN X, GEN Xinf, GEN gs);
     595             : GEN nflist_C9_worker(GEN P, GEN X, GEN Xinf);
     596             : GEN nflist_C3C3_worker(GEN gi, GEN V3, GEN V3D, GEN X);
     597             : GEN nflist_S3R_worker(GEN ga, GEN ALLCTS);
     598             : GEN nflist_S3I_worker(GEN ga, GEN ALLCTS);
     599             : GEN nflist_D9_worker(GEN P2, GEN X, GEN Xinf);
     600             : GEN nflist_S32_worker(GEN all1, GEN X, GEN Xinf, GEN V3, GEN gs);
     601             : 
     602             : /* pari_init / pari_close */
     603             : void pari_close_compiler(void);
     604             : void pari_close_evaluator(void);
     605             : void pari_close_files(void);
     606             : void pari_close_floats(void);
     607             : void pari_close_homedir(void);
     608             : void pari_close_parser(void);
     609             : void pari_close_paths(void);
     610             : void pari_close_primes(void);
     611             : void pari_init_buffers(void);
     612             : void pari_init_compiler(void);
     613             : void pari_init_defaults(void);
     614             : void pari_init_ellcondfile(void);
     615             : void pari_init_evaluator(void);
     616             : void pari_init_files(void);
     617             : void pari_init_floats(void);
     618             : void pari_close_hgm(void);
     619             : void pari_init_hgm(void);
     620             : void pari_init_homedir(void);
     621             : void pari_init_graphics(void);
     622             : void pari_init_parser(void);
     623             : void pari_init_rand(void);
     624             : void pari_init_paths(void);
     625             : void pari_init_primetab(void);
     626             : void pari_init_seadata(void);
     627             : GEN pari_get_seadata(void);
     628             : void pari_set_primetab(GEN global_primetab);
     629             : void pari_set_seadata(GEN seadata);
     630             : void pari_set_varstate(long *vp, struct pari_varstate *vs);
     631             : void pari_thread_close_files(void);
     632             : 
     633             : void export_add(const char *str, GEN val);
     634             : void export_del(const char *str);
     635             : GEN  export_get(const char *str);
     636             : void exportall(void);
     637             : void unexportall(void);
     638             : 
     639             : /* BY FILES */
     640             : 
     641             : /* parinf.h */
     642             : 
     643             : GEN  coltoalg(GEN nf,GEN x);
     644             : GEN  fincke_pohst(GEN a,GEN BOUND,long stockmax,long PREC, FP_chk_fun *CHECK);
     645             : void init_zlog(zlog_S *S, GEN bid);
     646             : GEN  log_gen_arch(zlog_S *S, long index);
     647             : GEN  log_gen_pr(zlog_S *S, long index, GEN nf, long e);
     648             : GEN  make_integral(GEN nf, GEN L0, GEN f, GEN listpr);
     649             : GEN  poltobasis(GEN nf,GEN x);
     650             : GEN  rnfdisc_get_T(GEN nf, GEN P, GEN *lim);
     651             : GEN  rnfallbase(GEN nf, GEN pol, GEN lim, GEN eq, GEN *pD, GEN *pfi, GEN *pdKP);
     652             : GEN  sprk_log_gen_pr(GEN nf, GEN sprk, long e);
     653             : GEN  sprk_log_gen_pr2(GEN nf, GEN sprk, long e);
     654             : GEN  sprk_log_prk1(GEN nf, GEN a, GEN sprk);
     655             : GEN  sprk_to_bid(GEN nf, GEN L, long flag);
     656             : GEN  subgroupcondlist(GEN cyc, GEN bound, GEN listKer);
     657             : 
     658             : /* Qfb.c */
     659             : 
     660             : GEN     redimagsl2(GEN q, GEN *U);
     661             : 
     662             : /* alglin1.c */
     663             : 
     664             : typedef long (*pivot_fun)(GEN,GEN,long,GEN);
     665             : GEN ZM_pivots(GEN x0, long *rr);
     666             : GEN RgM_pivots(GEN x0, GEN data, long *rr, pivot_fun pivot);
     667             : void RgMs_structelim_col(GEN M, long nbcol, long nbrow, GEN A, GEN *p_col, GEN *p_lin);
     668             : 
     669             : /* arith1.c */
     670             : 
     671             : int     is_gener_Fp(GEN x, GEN p, GEN p_1, GEN L);
     672             : int     is_gener_Fl(ulong x, ulong p, ulong p_1, GEN L);
     673             : 
     674             : /* arith2.c */
     675             : 
     676             : int     divisors_init(GEN n, GEN *pP, GEN *pE);
     677             : long    set_optimize(long what, GEN g);
     678             : 
     679             : /* base1.c */
     680             : 
     681             : GEN     zk_galoisapplymod(GEN nf, GEN z, GEN S, GEN p);
     682             : int     ZX_canon_neg(GEN z);
     683             : 
     684             : /* base2.c */
     685             : 
     686             : GEN     dim1proj(GEN prh);
     687             : GEN     gen_if_principal(GEN bnf, GEN x);
     688             : 
     689             : /* base3.c */
     690             : 
     691             : void    check_nfelt(GEN x, GEN *den);
     692             : GEN     zk_ei_mul(GEN nf, GEN x, long i);
     693             : GEN     log_prk(GEN nf, GEN a, GEN sprk, GEN mod);
     694             : GEN     log_prk_units(GEN nf, GEN D, GEN sprk);
     695             : GEN     log_prk_units_init(GEN bnf);
     696             : GEN     veclog_prk(GEN nf, GEN v, GEN sprk);
     697             : GEN     log_prk_init(GEN nf, GEN pr, long k, GEN mod);
     698             : GEN     check_mod_factored(GEN nf, GEN ideal, GEN *fa, GEN *fa2, GEN *archp, GEN MOD);
     699             : GEN     sprk_get_cyc(GEN s);
     700             : GEN     sprk_get_expo(GEN s);
     701             : GEN     sprk_get_gen(GEN s);
     702             : GEN     sprk_get_prk(GEN s);
     703             : GEN     sprk_get_ff(GEN s);
     704             : GEN     sprk_get_pr(GEN s);
     705             : void    sprk_get_AgL2(GEN s, GEN *A, GEN *g, GEN *L2);
     706             : void    sprk_get_U2(GEN s, GEN *U1, GEN *U2);
     707             : GEN     famat_zlog_pr(GEN nf, GEN g, GEN e, GEN sprk, GEN mod);
     708             : 
     709             : /* base4.c */
     710             : 
     711             : GEN     factorbackprime(GEN nf, GEN L, GEN e);
     712             : 
     713             : /* base5.c */
     714             : 
     715             : GEN     condliftA4(GEN nf);
     716             : GEN     condliftA5(GEN nf);
     717             : GEN     condliftS4(GEN nf);
     718             : 
     719             : /* bb_group.c */
     720             : 
     721             : GEN     producttree_scheme(long n);
     722             : 
     723             : /* bern.c */
     724             : long bernbitprec(long N);
     725             : 
     726             : /* bibli2.c */
     727             : 
     728             : GEN sort_factor_pol(GEN y, int (*cmp)(GEN,GEN));
     729             : 
     730             : /* buch1.c */
     731             : 
     732             : ulong   bnf_increase_LIMC(ulong LIMC, ulong LIMCMAX);
     733             : 
     734             : /* buch2.c */
     735             : 
     736             : typedef struct GRHprime_t { ulong p; double logp; GEN dec; } GRHprime_t;
     737             : typedef struct GRHcheck_t { double cD, cN; GRHprime_t *primes; long clone, nprimes, maxprimes; ulong limp; forprime_t P; } GRHcheck_t;
     738             : void    free_GRHcheck(GRHcheck_t *S);
     739             : void    init_GRHcheck(GRHcheck_t *S, long N, long R1, double LOGD);
     740             : void    GRH_ensure(GRHcheck_t *S, long nb);
     741             : ulong   GRH_last_prime(GRHcheck_t *S);
     742             : int     GRHok(GRHcheck_t *S, double L, double SA, double SB);
     743             : GEN     extract_full_lattice(GEN x);
     744             : GEN     init_red_mod_units(GEN bnf, long prec);
     745             : GEN     isprincipalarch(GEN bnf, GEN col, GEN kNx, GEN e, GEN dx, long *pe);
     746             : GEN     red_mod_units(GEN col, GEN z);
     747             : 
     748             : /* buch3.c */
     749             : 
     750             : GEN     minkowski_bound(GEN D, long N, long r2, long prec);
     751             : int     subgroup_conductor_ok(GEN H, GEN L);
     752             : GEN     subgrouplist_cond_sub(GEN bnr, GEN C, GEN bound);
     753             : 
     754             : /* crvwtors.c */
     755             : 
     756             : void random_curves_with_m_torsion(ulong *a4, ulong *a6, ulong *tx, ulong *ty, long ncurves, long m, ulong p, ulong pi);
     757             : 
     758             : /* dirichlet.c */
     759             : 
     760             : GEN direuler_factor(GEN s, long n);
     761             : GEN parsqfboth_worker(GEN gk, GEN vZ, GEN vVQ, GEN vV, GEN P, GEN Nsqstep);
     762             : GEN parsumprimeWfunboth_worker(GEN gk, GEN s, GEN W1, GEN W2, GEN f, GEN Nsqprec);
     763             : 
     764             : /* ellanal.c */
     765             : 
     766             : GEN hnaive_max(GEN ell, GEN ht);
     767             : 
     768             : /* elliptic.c */
     769             : 
     770             : GEN  ellQ_genreduce(GEN E, GEN G, GEN M, long prec);
     771             : GEN  ellQ_isdivisible(GEN E, GEN P, ulong l);
     772             : GEN  ellminimalbmodel(GEN E, GEN *ptv);
     773             : GEN  ellintegralbmodel(GEN e, GEN *pv);
     774             : void ellprint(GEN e);
     775             : 
     776             : /* ellrank.c */
     777             : 
     778             : GEN     ell2selmer_basis(GEN ell, GEN *cb, long prec);
     779             : 
     780             : /* es.c */
     781             : 
     782             : void    killallfiles(void);
     783             : pariFILE* newfile(FILE *f, const char *name, int type);
     784             : int     popinfile(void);
     785             : pariFILE* try_pipe(const char *cmd, int flag);
     786             : 
     787             : /* F2m.c */
     788             : 
     789             : GEN     F2m_gauss_pivot(GEN x, long *rr);
     790             : GEN     F2m_gauss_sp(GEN a, GEN b);
     791             : GEN     F2m_invimage_i(GEN A, GEN B);
     792             : 
     793             : /* Fle.c */
     794             : 
     795             : void    FleV_add_pre_inplace(GEN P, GEN Q, GEN a4, ulong p, ulong pi);
     796             : void    FleV_dbl_pre_inplace(GEN P, GEN a4, ulong p, ulong pi);
     797             : void    FleV_mulu_pre_inplace(GEN P, ulong n, GEN a4, ulong p, ulong pi);
     798             : void    FleV_sub_pre_inplace(GEN P, GEN Q, GEN a4, ulong p, ulong pi);
     799             : 
     800             : /* Flv.c */
     801             : 
     802             : GEN     Flm_gauss_sp(GEN a, GEN b, ulong *detp, ulong p);
     803             : GEN     Flm_invimage_i(GEN A, GEN B, ulong p);
     804             : GEN     Flm_inv_sp(GEN a, ulong *detp, ulong p);
     805             : GEN     Flm_pivots(GEN x, ulong p, long *rr, long inplace);
     806             : 
     807             : /* Flxq_log.c */
     808             : 
     809             : GEN Flxq_log_index(GEN a0, GEN b0, GEN m, GEN T0, ulong p);
     810             : int Flxq_log_use_index(GEN m, GEN T0, ulong p);
     811             : 
     812             : /* FlxqE.c */
     813             : 
     814             : GEN     ZpXQ_norm_pcyc(GEN x, GEN T, GEN q, GEN p);
     815             : long    zx_is_pcyc(GEN T);
     816             : 
     817             : /* FpV.c */
     818             : 
     819             : GEN FpMs_leftkernel_elt_col(GEN M, long nbcol, long nbrow, GEN p);
     820             : GEN FpX_to_mod_raw(GEN z, GEN p);
     821             : 
     822             : /* FpX.c */
     823             : 
     824             : GEN     ZlXQXn_expint(GEN h, long e, GEN T, GEN p, ulong pp);
     825             : 
     826             : /* FpX_factor.c */
     827             : 
     828             : GEN     ddf_to_ddf2(GEN V);
     829             : long    ddf_to_nbfact(GEN D);
     830             : GEN     vddf_to_simplefact(GEN V, long d);
     831             : 
     832             : /* FpXQX_factor.c */
     833             : 
     834             : GEN     FpXQX_factor_Berlekamp(GEN x, GEN T, GEN p);
     835             : 
     836             : /* forprime.c*/
     837             : 
     838             : void    init_modular_big(forprime_t *S);
     839             : void    init_modular_small(forprime_t *S);
     840             : 
     841             : /* galconj.c */
     842             : 
     843             : GEN     galoiscosets(GEN O, GEN perm);
     844             : GEN     galoisinitfromaut(GEN T, GEN aut, ulong l);
     845             : GEN     matrixnorm(GEN M, long prec);
     846             : 
     847             : /* gen1.c */
     848             : 
     849             : GEN     gred_rfrac_simple(GEN n, GEN d);
     850             : GEN     sqr_ser_part(GEN x, long l1, long l2);
     851             : 
     852             : /* hash.c */
     853             : 
     854             : hashtable *hashstr_import_static(hashentry *e, ulong size);
     855             : 
     856             : /* hyperell.c */
     857             : 
     858             : GEN     ZlXQX_hyperellpadicfrobenius(GEN H, GEN T, ulong p, long n);
     859             : GEN     hyperellextremalmodels(GEN F, long g, GEN p);
     860             : 
     861             : /* intnum.c */
     862             : 
     863             : GEN     contfraceval_inv(GEN CF, GEN tinv, long nlim);
     864             : GEN     contfracinit_i(GEN M, long n);
     865             : 
     866             : /* lfunlarge.c */
     867             : 
     868             : GEN int_h0_worker(GEN j, GEN sel, GEN s, GEN chi, GEN gprec);
     869             : 
     870             : /* FIXME: delete */
     871             : GEN lerchzetalarge(GEN s, GEN a, GEN lam, long prec);
     872             : GEN lfunloglambdalarge(GEN CHI, GEN s, long bitprec);
     873             : GEN lfunlambdalarge(GEN CHI, GEN s, long bitprec);
     874             : GEN lfunlarge(GEN CHI, GEN s, long bitprec);
     875             : GEN zetahurwitzlarge(GEN s, GEN a, long prec);
     876             : GEN serh_worker(GEN gk, GEN V, GEN a, GEN ns, GEN gprec);
     877             : 
     878             : /* mftrace.c */
     879             : 
     880             : void pari_close_mf(void);
     881             : long polishomogeneous(GEN P);
     882             : GEN sertocol(GEN S);
     883             : GEN mfrhopol(long n);
     884             : GEN mfrhopol_u_eval(GEN Q, ulong t2);
     885             : GEN mfrhopol_eval(GEN Q, GEN t2);
     886             : 
     887             : /* prime.c */
     888             : 
     889             : long    BPSW_psp_nosmalldiv(GEN N);
     890             : int     MR_Jaeschke(GEN n);
     891             : long    Z_isanypower_nosmalldiv(GEN N, ulong cutoff, GEN *px);
     892             : 
     893             : /* perm.c */
     894             : 
     895             : long    cosets_perm_search(GEN C, GEN p);
     896             : GEN     perm_generate(GEN S, GEN H, long o);
     897             : long    perm_relorder(GEN p, GEN S);
     898             : GEN     vecperm_extendschreier(GEN C, GEN v, long n);
     899             : 
     900             : /* polclass.c */
     901             : 
     902             : GEN polclass0(long D, long inv, long vx, GEN *db);
     903             : 
     904             : /* polmodular.c */
     905             : 
     906             : GEN polmodular0_ZM(long L, long inv, GEN J, GEN Q, int compute_derivs, GEN *db);
     907             : GEN Flm_Fl_polmodular_evalx(GEN phi, long L, ulong j, ulong p, ulong pi);
     908             : GEN polmodular_db_init(long inv);
     909             : void polmodular_db_clear(GEN db);
     910             : void polmodular_db_add_level(GEN *db, long L, long inv);
     911             : void polmodular_db_add_levels(GEN *db, long *levels, long k, long inv);
     912             : GEN polmodular_db_for_inv(GEN db, long inv);
     913             : GEN polmodular_db_getp(GEN fdb, long L, ulong p);
     914             : 
     915             : long modinv_level(long inv);
     916             : long modinv_degree(long *p1, long *p2, long inv);
     917             : long modinv_ramified(long D, long inv, long *pN);
     918             : long modinv_j_from_2double_eta(GEN F, long inv, ulong x0, ulong x1, ulong p, ulong pi);
     919             : GEN double_eta_raw(long inv);
     920             : ulong modfn_root(ulong j, norm_eqn_t ne, long inv);
     921             : long modfn_unambiguous_root(ulong *r, long inv, ulong j0, norm_eqn_t ne, GEN jdb);
     922             : GEN qfb_nform(long D, long n);
     923             : 
     924             : /* Fle.c */
     925             : 
     926             : ulong   Flj_order_ufact(GEN P, ulong n, GEN F, ulong a4, ulong p, ulong pi);
     927             : 
     928             : /* polarit3.c */
     929             : 
     930             : GEN     Flm_Frobenius_pow(GEN M, long d, GEN T, ulong p);
     931             : GEN     FpM_Frobenius_pow(GEN M, long d, GEN T, GEN p);
     932             : GEN     RgXQ_charpoly_i(GEN x, GEN T, long v);
     933             : ulong   ZX_ZXY_ResBound(GEN A, GEN B, GEN dB);
     934             : GEN     ffinit_Artin_Schreier(ulong p, long l);
     935             : GEN     ffinit_rand(GEN p, long n);
     936             : GEN     nf_direct_compositum(GEN nf, GEN A, GEN B);
     937             : 
     938             : /* nflist.c */
     939             : 
     940             : GEN veccond_to_A5(GEN L, long s);
     941             : long ceilsqrtdiv(GEN x, GEN y);
     942             : 
     943             : /* nflistQT.c */
     944             : 
     945             : GEN nflistQT(long n, long k, long v);
     946             : 
     947             : /* ramanujantau.c */
     948             : GEN     ramanujantau_worker(GEN gt, GEN p2_7, GEN p_9, GEN p);
     949             : GEN     taugen_n_worker(GEN t, GEN pol, GEN p4);
     950             : 
     951             : /* readline.c */
     952             : 
     953             : char**  pari_completion(pari_rl_interface *pari_rl, char *text, int START, int END);
     954             : char**  pari_completion_matches(pari_rl_interface *pari_rl, const char *s, long pos, long *wordpos);
     955             : 
     956             : /* subcyclo.c */
     957             : 
     958             : GEN     galoiscyclo(long n, long v);
     959             : long    subcyclo_nH(const char *fun, GEN N, GEN *psg);
     960             : GEN     znstar_bits(long n, GEN H);
     961             : long    znstar_conductor(GEN H);
     962             : long    znstar_conductor_bits(GEN bits);
     963             : GEN     znstar_cosets(long n, long phi_n, GEN H);
     964             : GEN     znstar_elts(long n, GEN H);
     965             : GEN     znstar_generate(long n, GEN V);
     966             : GEN     znstar_hnf(GEN Z, GEN M);
     967             : GEN     znstar_hnf_elts(GEN Z, GEN H);
     968             : GEN     znstar_hnf_generators(GEN Z, GEN M);
     969             : GEN     znstar_reduce_modulus(GEN H, long n);
     970             : GEN     znstar_small(GEN zn);
     971             : 
     972             : /* trans1.c */
     973             : 
     974             : struct abpq { GEN *a, *b, *p, *q; };
     975             : struct abpq_res { GEN P, Q, B, T; };
     976             : void    abpq_init(struct abpq *A, long n);
     977             : void    abpq_sum(struct abpq_res *r, long n1, long n2, struct abpq *A);
     978             : GEN     logagmcx(GEN q, long prec);
     979             : GEN     zellagmcx(GEN a0, GEN b0, GEN r, GEN t, long prec);
     980             : 
     981             : /* trans2.c */
     982             : 
     983             : GEN     trans_fix_arg(long *prec, GEN *s0, GEN *sig, GEN *tau, pari_sp *av, GEN *res);
     984             : 
     985             : /* trans3.c */
     986             : 
     987             : GEN     double_eta_quotient(GEN a, GEN w, GEN D, long p, long q, GEN pq, GEN sqrtD);
     988             : GEN     inv_szeta_euler(long n, long prec);
     989             : GEN     lerch_worker(GEN t, GEN E);
     990             : 
     991             : /* volcano.c */
     992             : 
     993             : long j_level_in_volcano(GEN phi, ulong j, ulong p, ulong pi, long L, long depth);
     994             : ulong ascend_volcano(GEN phi, ulong j, ulong p, ulong pi, long level, long L, long depth, long steps);
     995             : ulong descend_volcano(GEN phi, ulong j, ulong p, ulong pi, long level, long L, long depth, long steps);
     996             : long next_surface_nbr(ulong *nJ, GEN phi, long L, long h, ulong J, const ulong *pJ, ulong p, ulong pi);
     997             : GEN enum_roots(ulong j, norm_eqn_t ne, GEN fdb, GEN G, GEN vshape);
     998             : 
     999             : ENDEXTERN

Generated by: LCOV version 1.16