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) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30744-52374ab6cf) Lines: 1595 1636 97.5 %
Date: 2026-03-17 09:26:37 Functions: 163 163 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by 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
ldata_get_k1 105
lfununext 105
lfununextvec 105
derser 126
lfunnoinit 224
lfunthetainit 343
lfunser 371
lfunservec 371
Rtor 413
lfunthetaspec 441
lfuninit0 539
lfunorderzero 560
lfuncenterinit 567
ser_coeff0 1260
lfunlambda0 1540
lfunderiv 1652
gammafrac 1995
theta_pole_contrib 2030
rfrac_degree 2226
lfunlambdaord 2254
der_level 2290
ginvsqrtvec 2394
_product 2456
lfunan 2464
lfunprod_get_fact 2575
ldata_isreal 2820
Z_radical 2863
znchargauss_i 2863
gsubvec 3591
lfuncheckfeq_i 3633
lfuncheckfeq 3766
lfunparams2 4032
lfunsumcoth 4283
polgammaeval 4508
lfunrtopoles 4683
wrap2 4942
rtoR 5082
lfunlambda 5108
serpole 5131
simple_pole 5236
gammaordinary 5264
lfun_get_Residue 5305
lfunpoleresidue 5305
znchargauss 5516
normalizepoles 5572
theta_get_R 5929
normalize_simple_pole 6174
lfunrootno 6328
get_eno 6398
ropm1 6741
fracgammadegree 6769
wrap1 6895
serisscalar 6979
serextendifnegint 7000
lfunrootres 7252
lfun0 7280
theta_add_polar_part 7343
deg1ser_shallow 8267
mkvroots 8750
theta_get_K 8750
veccothderivn 8825
polepart 8944
residues_known 9016
gdivvec 9989
theta_dual 10010
is_dirichlet 10108
lfun_OK 10290
lfun_get_factgammavec 10290
gamma_R 10416
lfunthetainit_i 10423
lfuninit_cutoff 11016
lfuninit_ab 11158
lfun_init_theta 11172
lfuninit_pol 11312
gamma_C 11452
condset 11879
lfuninit_make 12264
mysercoeff 12605
lfun 13559
mulrealvec 15890
lfuncost 16270
lfunhardyzeros 18563
antwist 18641
is_ser 19285
lfun_get_expot 19354
lfun_get_w2 19354
lfunhardy 19361
get_domain 20312
fracgammaeval 20874
gammafactproduct 20874
lfunrtoR 21567
lfunthetainit0 21567
prec_fix 21567
isnegint 21595
lfuninit_theta2_worker 22394
gammafactor 22449
lfunrtoR_eno 23786
lfunrtoR_i 24262
sdomain_isincl 25078
checklfuninit 25155
domain_get_der 25582
ldata_get_degree 26129
lfunp_set 27442
sumVgaimpos 27442
gmulvec 31918
lfun_get_pol 32317
lfun_get_step 32317
lfunlambda_OK 33996
lfuninit 37125
domain_get_bitprec 37307
lfunspec_OK 38777
theta1 39568
vgaell 43858
lfun_get_k2 50404
lfuntheta 52262
theta_get_an 52556
theta_get_tdom 54460
lfuninit_worker 58559
lfun_get_dom 59775
ldata_get_dual 60886
lfunthetacheckinit 62601
theta_get_isqrtN 63413
lfunthetacost 65177
theta_get_bitprec 66374
ldata_get_an 75852
ldata_get_type 77919
worker_init 80931
domain_get_dom 84958
lfun_get_domain 85525
get_cone_fuzz 86730
Vgaeasytheta 88179
gammavec_expo 92612
ldata_get_k1_dbl 92619
theta_get_m 102277
sumVga 104876
ldata_get_rootno 107310
get_cone 141190
parse_dom 142330
linit_get_type 148327
ldata_get_k 156702
ldata_get_residue 178493
linit_get_ldata 199017
linit_get_tech 251486
an_msum 256553
ldata_get_conductor 276359
theta2 286849
theta2_i 295022
is_linit 303545
mulT 334585
ldata_get_gammavec 353921
mul_an 14718440
get_an 15153354
vecan_cmul 35569758

Generated by: LCOV version 1.16