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 30530-11e908049b) Lines: 1595 1636 97.5 %
Date: 2025-10-13 09:22:58 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
ldata_get_k1 98
lfunconductor 98
lfunzeros 98
lfunzeros_i 98
parse_maxcond 98
lfununext 105
lfununextvec 105
derser 126
lfunnoinit 224
lfunthetainit 336
lfunser 371
lfunservec 371
Rtor 413
lfunthetaspec 434
lfuninit0 532
lfunorderzero 553
lfuncenterinit 560
ser_coeff0 1232
lfunlambda0 1512
lfunderiv 1624
gammafrac 1736
rfrac_degree 1799
theta_pole_contrib 1918
lfunlambdaord 2226
der_level 2248
ginvsqrtvec 2387
_product 2456
lfunan 2457
lfunprod_get_fact 2575
ldata_isreal 2813
Z_radical 2863
znchargauss_i 2863
gsubvec 3556
lfuncheckfeq_i 3598
lfunparams2 3598
polgammaeval 3654
lfuncheckfeq 3731
lfunsumcoth 4157
lfunrtopoles 4473
rtoR 4704
wrap2 4942
serpole 5089
lfunlambda 5094
lfun_get_Residue 5151
lfunpoleresidue 5151
gammaordinary 5166
simple_pole 5194
normalizepoles 5348
znchargauss 5516
theta_get_R 5901
lfunrootno 5971
get_eno 6034
normalize_simple_pole 6048
fracgammadegree 6349
ropm1 6384
serisscalar 6559
serextendifnegint 6580
lfunrootres 6804
lfun0 6874
wrap1 6895
theta_add_polar_part 6951
deg1ser_shallow 7511
mkvroots 7889
theta_get_K 7889
veccothderivn 8377
polepart 8496
residues_known 8694
gdivvec 9597
theta_dual 9618
is_dirichlet 9716
lfun_OK 9856
lfun_get_factgammavec 9856
gamma_R 10318
lfunthetainit_i 10367
gamma_C 10724
lfuninit_ab 10724
lfun_init_theta 10738
lfuninit_pol 10878
lfuninit_cutoff 11016
lfuninit_make 11830
condset 11879
mysercoeff 12017
lfun 13139
mulrealvec 15890
lfuncost 16235
is_ser 18459
lfunhardyzeros 18563
antwist 18599
lfun_get_expot 19340
lfun_get_w2 19340
lfunhardy 19347
get_domain 19850
fracgammaeval 20048
gammafactproduct 20048
isnegint 20776
lfunrtoR 21077
lfunthetainit0 21077
prec_fix 21077
gammafactor 21791
lfuninit_theta2_worker 22395
lfunrtoR_eno 23198
lfunrtoR_i 23674
sdomain_isincl 25022
checklfuninit 25099
domain_get_der 25519
ldata_get_degree 26115
lfunp_set 26973
sumVgaimpos 26973
gmulvec 31442
lfun_get_pol 31841
lfun_get_step 31841
lfunlambda_OK 33520
lfuninit 36635
domain_get_bitprec 36817
lfunspec_OK 38301
theta1 39568
vgaell 42108
lfun_get_k2 49914
lfuntheta 51821
theta_get_an 52108
theta_get_tdom 53669
lfuninit_worker 56381
lfun_get_dom 59222
ldata_get_dual 59381
lfunthetacheckinit 61768
theta_get_isqrtN 62538
lfunthetacost 64337
theta_get_bitprec 65583
ldata_get_an 74410
ldata_get_type 76645
worker_init 78761
domain_get_dom 84349
lfun_get_domain 84909
get_cone_fuzz 85400
Vgaeasytheta 86835
gammavec_expo 91303
ldata_get_k1_dbl 91310
theta_get_m 101465
sumVga 103133
ldata_get_rootno 104916
get_cone 139069
parse_dom 140797
linit_get_type 146899
ldata_get_k 153797
ldata_get_residue 174804
linit_get_ldata 196595
an_msum 239256
linit_get_tech 248693
ldata_get_conductor 271508
theta2 286843
theta2_i 294994
is_linit 299261
mulT 334562
ldata_get_gammavec 347789
mul_an 12719450
get_an 14712655
vecan_cmul 35558296

Generated by: LCOV version 1.16