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 30438-dbd0fb03e8) Lines: 1591 1632 97.5 %
Date: 2025-08-03 09:23:43 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 420
lfuninit0 532
lfunorderzero 553
lfuncenterinit 560
ser_coeff0 1232
lfunlambda0 1512
lfunderiv 1624
gammafrac 1708
rfrac_degree 1799
theta_pole_contrib 1918
lfunlambdaord 2226
der_level 2248
ginvsqrtvec 2373
lfunan 2450
_product 2456
lfunprod_get_fact 2575
ldata_isreal 2813
Z_radical 2863
znchargauss_i 2863
gsubvec 3556
lfuncheckfeq_i 3598
lfunparams2 3598
polgammaeval 3640
lfuncheckfeq 3731
lfunsumcoth 4157
lfunrtopoles 4473
rtoR 4704
wrap2 5032
serpole 5089
lfunlambda 5094
lfun_get_Residue 5151
lfunpoleresidue 5151
gammaordinary 5166
simple_pole 5194
normalizepoles 5348
znchargauss 5516
lfunrootno 5957
theta_get_R 5991
get_eno 6006
normalize_simple_pole 6048
fracgammadegree 6349
ropm1 6370
serisscalar 6559
serextendifnegint 6580
lfunrootres 6790
lfun0 6860
wrap1 6888
theta_add_polar_part 6923
deg1ser_shallow 7511
mkvroots 7889
theta_get_K 7889
veccothderivn 8377
polepart 8496
residues_known 8694
gdivvec 9583
theta_dual 9604
is_dirichlet 9702
lfun_OK 9842
lfun_get_factgammavec 9842
gamma_R 10318
lfunthetainit_i 10367
gamma_C 10710
lfuninit_ab 10710
lfun_init_theta 10724
lfuninit_pol 10864
lfuninit_cutoff 11016
lfuninit_make 11816
condset 11962
mysercoeff 12017
lfun 13125
mulrealvec 15897
lfuncost 16242
is_ser 18431
lfunhardyzeros 18570
antwist 18585
lfun_get_expot 19347
lfun_get_w2 19347
lfunhardy 19354
get_domain 19836
fracgammaeval 20034
gammafactproduct 20034
isnegint 20762
lfunrtoR 21063
lfunthetainit0 21063
prec_fix 21063
gammafactor 21777
lfuninit_theta2_worker 22352
lfunrtoR_eno 23184
lfunrtoR_i 23660
sdomain_isincl 25029
checklfuninit 25106
domain_get_der 25526
ldata_get_degree 26122
lfunp_set 26966
sumVgaimpos 26966
gmulvec 31435
lfun_get_pol 31834
lfun_get_step 31834
lfunlambda_OK 33513
lfuninit 36628
domain_get_bitprec 36810
lfunspec_OK 38294
theta1 39928
vgaell 42010
lfun_get_k2 49914
lfuntheta 52125
theta_get_an 52412
theta_get_tdom 53959
lfuninit_worker 56375
lfun_get_dom 59222
ldata_get_dual 59346
lfunthetacheckinit 62058
theta_get_isqrtN 62828
lfunthetacost 64627
theta_get_bitprec 65956
ldata_get_an 74368
ldata_get_type 76610
worker_init 78715
domain_get_dom 84356
lfun_get_domain 84916
get_cone_fuzz 85676
Vgaeasytheta 87111
gammavec_expo 91586
ldata_get_k1_dbl 91593
theta_get_m 102059
sumVga 103402
ldata_get_rootno 104860
get_cone 139635
parse_dom 140790
linit_get_type 147196
ldata_get_k 153741
ldata_get_residue 175024
linit_get_ldata 196843
an_msum 239263
linit_get_tech 249342
ldata_get_conductor 271714
theta2 274492
theta2_i 282587
is_linit 299481
mulT 322512
ldata_get_gammavec 348257
mul_an 12878486
get_an 14712655
vecan_cmul 34137738

Generated by: LCOV version 1.16