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

Generated by: LCOV version 1.16