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 30107-5d3c5ac62a) Lines: 1591 1632 97.5 %
Date: 2025-04-01 09:20:36 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 86565
Z_radical 2856
_product 2442
an_msum 224964
antwist 18312
checkconductor 84
checklfuninit 24840
condset 11962
deg1ser_shallow 7483
der_level 2248
derser 126
derservec 63
domain_get_bitprec 36278
domain_get_der 25260
domain_get_dom 83530
fracgammadegree 6321
fracgammaeval 19754
gamma_C 10682
gamma_R 10066
gammafactor 21259
gammafactproduct 19754
gammafrac 1708
gammaordinary 4942
gammavec_expo 90851
gdivvec 9366
get_an 14711353
get_cone 138431
get_cone_fuzz 84906
get_domain 19514
get_eno 5789
ginvsqrtvec 2219
gmulvec 31155
gsubvec 3556
is_dirichlet 9450
is_linit 296660
is_ser 18375
isnegint 20482
ldata_get_an 73724
ldata_get_conductor 268739
ldata_get_degree 25681
ldata_get_dual 58569
ldata_get_gammavec 344904
ldata_get_k 151935
ldata_get_k1 98
ldata_get_k1_dbl 90858
ldata_get_residue 173008
ldata_get_rootno 103544
ldata_get_type 75308
ldata_isreal 2799
lfun 13083
lfun0 6846
lfun_OK 9814
lfun_get_Residue 5151
lfun_get_bitprec 91
lfun_get_dom 58662
lfun_get_domain 84090
lfun_get_expot 19347
lfun_get_factgammavec 9814
lfun_get_k2 49634
lfun_get_pol 31554
lfun_get_step 31554
lfun_get_w2 19347
lfun_init_theta 10472
lfunan 2450
lfuncenterinit 560
lfuncheckfeq 3731
lfuncheckfeq_i 3598
lfunconductor 98
lfuncost 16242
lfuncost0 49
lfunderiv 1624
lfunhardy 19354
lfunhardyzeros 18570
lfuninit 36096
lfuninit0 532
lfuninit_ab 10458
lfuninit_cutoff 10568
lfuninit_make 11550
lfuninit_pol 10612
lfuninit_theta2_worker 22262
lfuninit_worker 53240
lfunlambda 4814
lfunlambda0 1512
lfunlambda_OK 33219
lfunlambdaord 2226
lfunnoinit 224
lfunorderzero 553
lfunp_set 26714
lfunparams2 3374
lfunpoleresidue 5151
lfunprod_get_fact 2561
lfunrootno 5740
lfunrootres 6559
lfunrtoR 20776
lfunrtoR_eno 22883
lfunrtoR_i 23359
lfunrtopoles 4445
lfunser 371
lfunservec 371
lfunspec_OK 37972
lfunsumcoth 4157
lfuntheta 51873
lfunthetacheckinit 61589
lfunthetacost 64144
lfunthetacost0 21
lfunthetainit 336
lfunthetainit0 20776
lfunthetainit_i 10332
lfunthetaspec 420
lfununext 105
lfununextvec 105
lfunzeros 98
lfunzeros_i 98
linit_get_ldata 195247
linit_get_tech 247536
linit_get_type 145908
mkvroots 7651
mulT 320737
mul_an 12781836
mulrealvec 15897
mysercoeff 12017
normalize_simple_pole 6006
normalizepoles 5320
parse_dom 139446
parse_maxcond 98
polepart 8496
polgammaeval 3640
prec_fix 20776
residues_known 8652
rfrac_degree 1799
ropm1 6153
rtoR 4676
sdomain_isincl 24763
ser_coeff0 1232
serextendifnegint 6552
serisscalar 6531
serpole 5047
sersplit1 42
simple_pole 5152
sumVga 102401
sumVgaimpos 26714
theta1 39711
theta2 272955
theta2_i 281030
theta_add_polar_part 6706
theta_dual 9387
theta_get_K 7651
theta_get_R 5991
theta_get_an 52160
theta_get_bitprec 65522
theta_get_isqrtN 62324
theta_get_m 101387
theta_get_tdom 53525
theta_pole_contrib 1918
vecan_cmul 34048006
veccothderivn 8377
vgaell 41667
worker_init 75485
wrap1 6888
wrap2 5032
znchargauss 5502
znchargauss_i 2856

Generated by: LCOV version 1.16