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 30548-ec77dc363d) Lines: 1595 1636 97.5 %
Date: 2025-11-14 09:22:38 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 87073
Z_radical 2863
_product 2456
an_msum 241839
antwist 18627
checkconductor 84
checklfuninit 25155
condset 11879
deg1ser_shallow 8267
der_level 2290
derser 126
derservec 63
domain_get_bitprec 36957
domain_get_der 25582
domain_get_dom 84608
fracgammadegree 6769
fracgammaeval 20524
gamma_C 11102
gamma_R 10416
gammafactor 22099
gammafactproduct 20524
gammafrac 1995
gammaordinary 5264
gammavec_expo 91527
gdivvec 9625
get_an 14713635
get_cone 139363
get_cone_fuzz 85631
get_domain 19962
get_eno 6034
ginvsqrtvec 2387
gmulvec 31568
gsubvec 3584
is_dirichlet 9758
is_linit 300325
is_ser 18585
isnegint 21245
ldata_get_an 74774
ldata_get_conductor 272747
ldata_get_degree 26129
ldata_get_dual 59822
ldata_get_gammavec 349224
ldata_get_k 154574
ldata_get_k1 105
ldata_get_k1_dbl 91534
ldata_get_residue 175630
ldata_get_rootno 105539
ldata_get_type 76869
ldata_isreal 2820
lfun 13209
lfun0 6930
lfun_OK 9940
lfun_get_Residue 5305
lfun_get_bitprec 91
lfun_get_dom 59425
lfun_get_domain 85175
lfun_get_expot 19354
lfun_get_factgammavec 9940
lfun_get_k2 50054
lfun_get_pol 31967
lfun_get_step 31967
lfun_get_w2 19354
lfun_init_theta 10822
lfunan 2464
lfuncenterinit 567
lfuncheckfeq 3759
lfuncheckfeq_i 3626
lfunconductor 98
lfuncost 16270
lfuncost0 49
lfunderiv 1652
lfunhardy 19361
lfunhardyzeros 18563
lfuninit 36775
lfuninit0 539
lfuninit_ab 10808
lfuninit_cutoff 11016
lfuninit_make 11914
lfuninit_pol 10962
lfuninit_theta2_worker 22395
lfuninit_worker 57166
lfunlambda 5108
lfunlambda0 1540
lfunlambda_OK 33646
lfunlambdaord 2254
lfunnoinit 224
lfunorderzero 560
lfunp_set 27092
lfunparams2 3682
lfunpoleresidue 5305
lfunprod_get_fact 2575
lfunrootno 5971
lfunrootres 6902
lfunrtoR 21203
lfunrtoR_eno 23422
lfunrtoR_i 23898
lfunrtopoles 4683
lfunser 371
lfunservec 371
lfunspec_OK 38427
lfunsumcoth 4283
lfuntheta 51891
lfunthetacheckinit 61866
lfunthetacost 64442
lfunthetacost0 21
lfunthetainit 343
lfunthetainit0 21203
lfunthetainit_i 10409
lfunthetaspec 434
lfununext 105
lfununextvec 105
lfunzeros 98
lfunzeros_i 98
linit_get_ldata 197211
linit_get_tech 249330
linit_get_type 147249
mkvroots 8043
mulT 334566
mul_an 12726558
mulrealvec 15890
mysercoeff 12605
normalize_simple_pole 6174
normalizepoles 5572
parse_dom 141280
parse_maxcond 98
polepart 8944
polgammaeval 4508
prec_fix 21203
residues_known 9016
rfrac_degree 2226
ropm1 6384
rtoR 5082
sdomain_isincl 25078
ser_coeff0 1260
serextendifnegint 7000
serisscalar 6979
serpole 5131
sersplit1 42
simple_pole 5236
sumVga 103441
sumVgaimpos 27092
theta1 39568
theta2 286845
theta2_i 294996
theta_add_polar_part 6979
theta_dual 9646
theta_get_K 8043
theta_get_R 5929
theta_get_an 52178
theta_get_bitprec 65646
theta_get_isqrtN 62692
theta_get_m 101528
theta_get_tdom 53732
theta_pole_contrib 2030
vecan_cmul 35517597
veccothderivn 8825
vgaell 42402
worker_init 79553
wrap1 6895
wrap2 4942
znchargauss 5516
znchargauss_i 2863

Generated by: LCOV version 1.16