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 30547-1b347192b6) Lines: 1595 1636 97.5 %
Date: 2025-11-12 09:22:59 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 434
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 2387
_product 2456
lfunan 2464
lfunprod_get_fact 2575
ldata_isreal 2820
Z_radical 2863
znchargauss_i 2863
gsubvec 3584
lfuncheckfeq_i 3626
lfunparams2 3682
lfuncheckfeq 3759
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
lfunrootno 5971
get_eno 6034
normalize_simple_pole 6174
ropm1 6384
fracgammadegree 6769
wrap1 6895
lfunrootres 6902
lfun0 6930
serisscalar 6979
theta_add_polar_part 6979
serextendifnegint 7000
mkvroots 8043
theta_get_K 8043
deg1ser_shallow 8267
veccothderivn 8825
polepart 8944
residues_known 9016
gdivvec 9625
theta_dual 9646
is_dirichlet 9758
lfun_OK 9940
lfun_get_factgammavec 9940
lfunthetainit_i 10409
gamma_R 10416
lfuninit_ab 10808
lfun_init_theta 10822
lfuninit_pol 10962
lfuninit_cutoff 11016
gamma_C 11102
condset 11879
lfuninit_make 11914
mysercoeff 12605
lfun 13209
mulrealvec 15890
lfuncost 16270
lfunhardyzeros 18563
is_ser 18585
antwist 18627
lfun_get_expot 19354
lfun_get_w2 19354
lfunhardy 19361
get_domain 19962
fracgammaeval 20524
gammafactproduct 20524
lfunrtoR 21203
lfunthetainit0 21203
prec_fix 21203
isnegint 21245
gammafactor 22099
lfuninit_theta2_worker 22392
lfunrtoR_eno 23422
lfunrtoR_i 23898
sdomain_isincl 25078
checklfuninit 25155
domain_get_der 25582
ldata_get_degree 26129
lfunp_set 27092
sumVgaimpos 27092
gmulvec 31568
lfun_get_pol 31967
lfun_get_step 31967
lfunlambda_OK 33646
lfuninit 36775
domain_get_bitprec 36957
lfunspec_OK 38427
theta1 39568
vgaell 42402
lfun_get_k2 50054
lfuntheta 51891
theta_get_an 52178
theta_get_tdom 53732
lfuninit_worker 57166
lfun_get_dom 59425
ldata_get_dual 59822
lfunthetacheckinit 61866
theta_get_isqrtN 62692
lfunthetacost 64442
theta_get_bitprec 65646
ldata_get_an 74774
ldata_get_type 76869
worker_init 79546
domain_get_dom 84608
lfun_get_domain 85175
get_cone_fuzz 85631
Vgaeasytheta 87073
gammavec_expo 91527
ldata_get_k1_dbl 91534
theta_get_m 101528
sumVga 103441
ldata_get_rootno 105539
get_cone 139363
parse_dom 141280
linit_get_type 147249
ldata_get_k 154574
ldata_get_residue 175630
linit_get_ldata 197211
an_msum 241832
linit_get_tech 249330
ldata_get_conductor 272747
theta2 286844
theta2_i 294995
is_linit 300325
mulT 334563
ldata_get_gammavec 349224
mul_an 12728663
get_an 14713635
vecan_cmul 35544626

Generated by: LCOV version 1.16