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 - basemath - lfun.c (source / functions) Coverage Total Hit
Test: PARI/GP v2.18.1 lcov report (development 31042-0fbe168e69) Lines: 97.5 % 1637 1596
Test Date: 2026-07-23 17:04:59 Functions: 100.0 % 163 163
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
Rtor 413
Vgaeasytheta 88851
Z_radical 2863
_product 2456
an_msum 260389
antwist 18725
checkconductor 84
checklfuninit 25267
condset 11879
deg1ser_shallow 8575
der_level 2318
derser 126
derservec 63
domain_get_bitprec 37517
domain_get_der 25708
domain_get_dom 85420
fracgammadegree 6923
fracgammaeval 21280
gamma_C 11466
gamma_R 10934
gammafactor 22841
gammafactproduct 21280
gammafrac 2254
gammaordinary 5446
gammavec_expo 93165
gdivvec 10129
get_an 15159549
get_cone 142072
get_cone_fuzz 87318
get_domain 20480
get_eno 6482
ginvsqrtvec 2394
gmulvec 32114
gsubvec 3647
is_dirichlet 10185
is_linit 305828
is_ser 19481
isnegint 22127
ldata_get_an 77106
ldata_get_conductor 279040
ldata_get_degree 26157
ldata_get_dual 61495
ldata_get_gammavec 357148
ldata_get_k 169561
ldata_get_k1 224
ldata_get_k1_dbl 93172
ldata_get_residue 179956
ldata_get_rootno 108318
ldata_get_type 78290
ldata_isreal 2834
lfun 13643
lfun0 7392
lfun_OK 10402
lfun_get_Residue 5431
lfun_get_bitprec 91
lfun_get_dom 60125
lfun_get_domain 86001
lfun_get_expot 19382
lfun_get_factgammavec 10402
lfun_get_k2 50628
lfun_get_pol 32513
lfun_get_step 32513
lfun_get_w2 19382
lfun_init_theta 11270
lfunan 2478
lfuncenterinit 581
lfuncheckfeq 3822
lfuncheckfeq_i 3689
lfunconductor 98
lfuncost 16347
lfuncost0 49
lfunderiv 1708
lfunhardy 19389
lfunhardyzeros 18563
lfuninit 37349
lfuninit0 553
lfuninit_ab 11256
lfuninit_cutoff 11016
lfuninit_make 12362
lfuninit_pol 11410
lfuninit_theta2_worker 22396
lfuninit_worker 59599
lfunlambda 5136
lfunlambda0 1596
lfunlambda_OK 34192
lfunlambdaord 2310
lfunnoinit 224
lfunorderzero 574
lfunp_set 27617
lfunparams2 4130
lfunpoleresidue 5431
lfunprod_get_fact 2575
lfunrootno 6412
lfunrootres 7364
lfunrtoR 21777
lfunrtoR_eno 24052
lfunrtoR_i 24528
lfunrtopoles 4809
lfunser 371
lfunservec 371
lfunspec_OK 38973
lfunsumcoth 4381
lfuntheta 52486
lfunthetacheckinit 62965
lfunthetacost 65555
lfunthetacost0 21
lfunthetainit 357
lfunthetainit0 21777
lfunthetainit_i 10535
lfunthetaspec 441
lfununext 105
lfununextvec 105
lfunzeros 98
lfunzeros_i 98
linit_get_ldata 200312
linit_get_tech 252802
linit_get_type 149139
mkvroots 9002
mulT 334733
mul_an 14693361
mulrealvec 15890
mysercoeff 12913
normalize_simple_pole 6230
normalizepoles 5712
parse_dom 143121
parse_maxcond 98
polepart 9140
polgammaeval 5054
prec_fix 21777
residues_known 9212
rfrac_degree 2499
ropm1 6825
rtoR 5208
sdomain_isincl 25190
ser_coeff0 1260
serextendifnegint 7168
serisscalar 7147
serpole 5131
sersplit1 42
simple_pole 5236
sumVga 105527
sumVgaimpos 27617
theta1 39638
theta2 286923
theta2_i 295095
theta_add_polar_part 7455
theta_dual 10150
theta_get_K 9002
theta_get_R 5957
theta_get_an 52780
theta_get_bitprec 66668
theta_get_isqrtN 63735
theta_get_m 102641
theta_get_tdom 54754
theta_pole_contrib 2086
vecan_cmul 35699737
veccothderivn 9021
vgaell 44432
worker_init 81995
wrap1 6895
wrap2 4942
znchargauss 5516
znchargauss_i 2863

Generated by: LCOV version 2.0-1