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 - bibli2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 1235 1295 95.4 %
Date: 2026-02-23 02:23:56 Functions: 116 121 95.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
indexlexsort 0
polhermite_eval 0
pollaguerre_eval 0
pollegendre_eval 0
pollegendre_reduced 0
key_search 5
setintersect 5
setunion 5
setunion_i 5
err_reverse 6
convol 10
polchebyshev1_eval 10
pollaplace 10
setdelta 10
setisset 10
serlaplace 11
err_hermite 15
err_lag 15
setbinop 15
modreverse 21
polchebyshev2_eval 25
laplace 26
indexvecsort 36
polchebyshev1_eval_aux 50
ZV_sort 54
cmp_small 55
eulerianpol 62
polchebyshev2_eval_aux 65
gprec 74
check_positive_entries 103
mathilbert 114
polrecip 126
ZC_union_shallow 130
stirling1 132
RgXQ_reverse 158
check_dy 182
RgV_polint 191
RgV_polint_fast 191
polintspec 212
gen_setminus 221
setminus 221
stirling 258
polint 280
polint_i 280
dirmul 377
vecsort0 612
vec_equiv 902
polhermite 1030
polhermite_eval0 1055
ZV_sort_shallow 1100
inC 1126
binomial0 1427
stirling2 1452
pollaguerre 1520
polchebyshev2 1525
polchebyshev1 1540
pollaguerre_eval0 1545
pollegendre 1545
pollegendre_eval0 1555
vecsort 2532
binomial_lval 2735
ZV_indexsort 3002
polchebyshev 3060
polchebyshev_eval 3095
matqpascal 3499
cmp_RgX_Rg 3814
QXQ_reverse 5181
closurecmp 6766
vec_reduce 18946
ZM_merge_factor 24009
ZV_union_shallow 33697
ZV_union_shallow_t 33827
ZV_sort_uniq_shallow 34091
vandermondeinverse 45995
ZV_sort_uniq 56720
gen_indexsort_uniq 65212
binomialuu 66413
vandermondeinverseinit 72433
polcyclo_eval 85681
binomial 87546
lexsort 91555
cmp_RgX 105820
vecsearch 108087
sort_function 108699
gtoset 174434
indexsort 175392
veccmp 252830
cmp_Flx 273741
gen_sort_uniq 282753
gen_sort_shallow 358959
dirdiv 372275
merge_sort_uniq 384408
polcyclo_prime 434441
setsearch 459793
polcyclo 542944
merge_factor 590828
cmp_prime_ideal 602347
gen_indexsort 730178
dirval 745304
ZV_search 920959
tablesearch 984217
sort 1629501
ZV_sort_inplace 1656591
sort_factor_pol 1679366
triv_sort 1761510
gen_sortspec_uniq 1894473
sort_extract 2713010
cmp_prime_over_p 2945217
gprec_wtrunc 3444230
gen_sort 4191772
gen_cmp_RgX 4646040
gprec_wensure 5025817
vecbinomial 6158751
sort_factor 8458621
zv_search 10699036
gprec_w 11759613
gen_search 17320616
gen_sort_inplace 33011855
init_sort 38640749
gen_sortspec 155223294
cmp_nodata 515141269

Generated by: LCOV version 1.16