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 30674-be81ecfdd4) Lines: 1595 1636 97.5 %
Date: 2026-02-11 09:23:10 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 87122
Z_radical 2863
_product 2456
an_msum 241857
antwist 18641
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 91562
gdivvec 9639
get_an 14713635
get_cone 139440
get_cone_fuzz 85680
get_domain 19962
get_eno 6041
ginvsqrtvec 2387
gmulvec 31568
gsubvec 3591
is_dirichlet 9758
is_linit 300395
is_ser 18585
isnegint 21245
ldata_get_an 74802
ldata_get_conductor 272852
ldata_get_degree 26129
ldata_get_dual 59836
ldata_get_gammavec 349364
ldata_get_k 154602
ldata_get_k1 105
ldata_get_k1_dbl 91569
ldata_get_residue 175693
ldata_get_rootno 105560
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 3766
lfuncheckfeq_i 3633
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 22393
lfuninit_worker 57146
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 5978
lfunrootres 6902
lfunrtoR 21217
lfunrtoR_eno 23436
lfunrtoR_i 23912
lfunrtopoles 4683
lfunser 371
lfunservec 371
lfunspec_OK 38427
lfunsumcoth 4283
lfuntheta 51912
lfunthetacheckinit 61901
lfunthetacost 64477
lfunthetacost0 21
lfunthetainit 343
lfunthetainit0 21217
lfunthetainit_i 10423
lfunthetaspec 434
lfununext 105
lfununextvec 105
lfunzeros 98
lfunzeros_i 98
linit_get_ldata 197260
linit_get_tech 249379
linit_get_type 147277
mkvroots 8043
mulT 334569
mul_an 12729810
mulrealvec 15890
mysercoeff 12605
normalize_simple_pole 6174
normalizepoles 5572
parse_dom 141280
parse_maxcond 98
polepart 8944
polgammaeval 4508
prec_fix 21217
residues_known 9016
rfrac_degree 2226
ropm1 6391
rtoR 5082
sdomain_isincl 25078
ser_coeff0 1260
serextendifnegint 7000
serisscalar 6979
serpole 5131
sersplit1 42
simple_pole 5236
sumVga 103476
sumVgaimpos 27092
theta1 39568
theta2 286830
theta2_i 295001
theta_add_polar_part 6986
theta_dual 9660
theta_get_K 8043
theta_get_R 5929
theta_get_an 52199
theta_get_bitprec 65674
theta_get_isqrtN 62713
theta_get_m 101577
theta_get_tdom 53760
theta_pole_contrib 2030
vecan_cmul 35550709
veccothderivn 8825
vgaell 42451
worker_init 79508
wrap1 6895
wrap2 4942
znchargauss 5516
znchargauss_i 2863

Generated by: LCOV version 1.16