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 30499-74bdd0ac5b) Lines: 1595 1636 97.5 %
Date: 2025-09-18 09:23:44 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 87181
Z_radical 2863
_product 2456
an_msum 239276
antwist 18599
checkconductor 84
checklfuninit 25106
condset 11962
deg1ser_shallow 7511
der_level 2248
derser 126
derservec 63
domain_get_bitprec 36824
domain_get_der 25526
domain_get_dom 84370
fracgammadegree 6349
fracgammaeval 20048
gamma_C 10724
gamma_R 10318
gammafactor 21791
gammafactproduct 20048
gammafrac 1736
gammaordinary 5166
gammavec_expo 91656
gdivvec 9597
get_an 14712655
get_cone 139761
get_cone_fuzz 85746
get_domain 19850
get_eno 6034
ginvsqrtvec 2387
gmulvec 31449
gsubvec 3556
is_dirichlet 9716
is_linit 299635
is_ser 18459
isnegint 20776
ldata_get_an 74396
ldata_get_conductor 271868
ldata_get_degree 26122
ldata_get_dual 59388
ldata_get_gammavec 348495
ldata_get_k 153825
ldata_get_k1 98
ldata_get_k1_dbl 91663
ldata_get_residue 175164
ldata_get_rootno 104930
ldata_get_type 76652
ldata_isreal 2813
lfun 13139
lfun0 6874
lfun_OK 9856
lfun_get_Residue 5151
lfun_get_bitprec 91
lfun_get_dom 59236
lfun_get_domain 84930
lfun_get_expot 19347
lfun_get_factgammavec 9856
lfun_get_k2 49928
lfun_get_pol 31848
lfun_get_step 31848
lfun_get_w2 19347
lfun_init_theta 10738
lfunan 2450
lfuncenterinit 560
lfuncheckfeq 3731
lfuncheckfeq_i 3598
lfunconductor 98
lfuncost 16242
lfuncost0 49
lfunderiv 1624
lfunhardy 19354
lfunhardyzeros 18570
lfuninit 36642
lfuninit0 532
lfuninit_ab 10724
lfuninit_cutoff 11016
lfuninit_make 11830
lfuninit_pol 10878
lfuninit_theta2_worker 22395
lfuninit_worker 56374
lfunlambda 5094
lfunlambda0 1512
lfunlambda_OK 33527
lfunlambdaord 2226
lfunnoinit 224
lfunorderzero 553
lfunp_set 26980
lfunparams2 3598
lfunpoleresidue 5151
lfunprod_get_fact 2575
lfunrootno 5971
lfunrootres 6804
lfunrtoR 21077
lfunrtoR_eno 23198
lfunrtoR_i 23674
lfunrtopoles 4473
lfunser 371
lfunservec 371
lfunspec_OK 38308
lfunsumcoth 4157
lfuntheta 52167
lfunthetacheckinit 62114
lfunthetacost 64683
lfunthetacost0 21
lfunthetainit 336
lfunthetainit0 21077
lfunthetainit_i 10367
lfunthetaspec 434
lfununext 105
lfununextvec 105
lfunzeros 98
lfunzeros_i 98
linit_get_ldata 196969
linit_get_tech 249496
linit_get_type 147266
mkvroots 7889
mulT 334913
mul_an 12879007
mulrealvec 15897
mysercoeff 12017
normalize_simple_pole 6048
normalizepoles 5348
parse_dom 140832
parse_maxcond 98
polepart 8496
polgammaeval 3654
prec_fix 21077
residues_known 8694
rfrac_degree 1799
ropm1 6384
rtoR 4704
sdomain_isincl 25029
ser_coeff0 1232
serextendifnegint 6580
serisscalar 6559
serpole 5089
sersplit1 42
simple_pole 5194
sumVga 103486
sumVgaimpos 26980
theta1 39928
theta2 286852
theta2_i 294989
theta_add_polar_part 6951
theta_dual 9618
theta_get_K 7889
theta_get_R 5991
theta_get_an 52454
theta_get_bitprec 66012
theta_get_isqrtN 62884
theta_get_m 102157
theta_get_tdom 54015
theta_pole_contrib 1918
vecan_cmul 35387694
veccothderivn 8377
vgaell 42094
worker_init 78755
wrap1 6888
wrap2 5032
znchargauss 5516
znchargauss_i 2863

Generated by: LCOV version 1.16