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 31041-bd73e9fcdd) Lines: 97.5 % 1637 1596
Test Date: 2026-07-22 22:45:42 Functions: 100.0 % 163 163
Legend: Lines:     hit not hit

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

Generated by: LCOV version 2.0-1