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 - kernel/none - level1.h (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30824-18397de1d0) Lines: 605 680 89.0 %
Date: 2026-04-18 09:26:04 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Mod64 0
affectsign 0
divsi_rem 0
divss 0
divss_rem 0
dvdiiz 0
dvdisz 0
dvdiuz 0
dvmdis 0
dvmdsi 0
dvmdss 0
get_avma 0
mod64 0
modss 0
mpceil 0
mpfloor 0
rdivis 0
rdivsi 0
remis 0
remsi 0
remss 0
sdivss_rem 0
shiftl 0
shiftlr 0
mptrunc 49
real_m2n 126
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 3313
stack_calloc_align 3325
varnmin 10374
uabsdivui_rem 16693
absr 20510
addss 25067
subss 25067
subuu 25067
dvdis 33737
cmprs 40996
cgetr_block 44252
sdivsi 102148
stack_calloc 110678
gc_stoi 155906
dvdui 167195
subis 171737
Fl_ellj_pre 238034
mindd 264380
truedivis 268371
cmpri 302870
mod16 307016
Mod32 311108
uutoineg 362417
Mod16 389733
mpdiv 395375
cgetg_block 423671
gc_utoi 468811
dvdiu 576274
umodui 711389
cmpsr 796104
rdivss 839647
real2n 1068638
addri 1106277
equalis 1151258
equalsi 1151440
gc_utoipos 1153591
real_0 1157772
mpround 1216583
absrnz_equal2n 1301146
cmpss 1392943
Mod8 2073968
mpcmp 2156214
Mod2 2370220
udivuu_rem 2418379
gc_int 2739330
mulru 2765892
subir 3000036
equaliu 3021813
equalui 3021815
itou_or_0 3147016
maxdd 3211469
cmpis 3634503
negr 3683371
cmpsi 3866509
ceildivuu 3901433
Fl_center 4486137
absrnz_equal1 4556890
real_1_bit 4714174
mod4 5140735
subri 6092998
subsi 6184719
truedivsi 6202318
umuluu_or_0 6282607
affsi 6446368
maxuu 6611107
mulrs 7181596
fractor 7380425
umuluu_le 7617880
gc_NULL 7962507
cmpir 9446421
ugcdiu 10320817
affectsign_safe 10730134
uabsdiviu_rem 11892741
addrs 12364098
smodss 12555263
cmpiu 12983552
cmpui 12983689
rdivii 13104635
rdiviiz 13149230
mpabs_shallow 13428463
divii 14050359
utor 14266473
affur 14266592
mod8 15588025
subrs 16544353
dvdii 16902704
Fl_halve 18773604
modis 19638526
int_bit 20938130
smodis 21176088
hammingu 24048771
evalvalser 24359582
abscmpui 33350920
abscmpiu 33351069
mulri 38307444
mpexpo 38878215
absequaliu 39546589
absequalui 41296614
Mod4 43846435
itos_or_0 44911718
modsi 45242107
affui 45491533
Fl_div 46707084
stack_malloc 46923804
umodi2n 48989980
sdivsi_rem 51446722
gc_ulong 51675952
truedivii 54754705
stack_malloc_align 55538717
affrr_fixlg 56115129
gc_bool 56801440
absi_shallow 57393675
mod2 62589951
Fl_addmulmul_pre 64550221
minuu 69666595
remlll_pre 75763179
evalprecp 78668753
evalvalp 81625223
Fl_triple 87175850
mpsqr 90780347
addiu 98768524
Fl_sqr 99446000
addui 102843500
fixlg 105854749
mod2BIL 107451226
mpodd 116093481
icopyspec 118027297
subiu 133462611
real_1 133707769
subui 138439674
mpshift 153506323
togglesign_safe 157309558
dvmduBIL 165625395
itou 179080199
gc_double 184161963
shiftr 188192417
vali 191178917
addis 194774396
varncmp 199456860
gc_long 242672743
mpsub 249744812
utoineg 298151968
cgetineg 299012801
rtor 303776487
addsi 319960128
muliu 373164467
Fl_double 442249941
shiftr_inplace 466814880
mulis 467114016
itos 476332899
real_0_bit 482101974
addir 482808421
affsr 501414756
stor 501746393
mpadd 572558185
negi 641035634
itor 716880840
Fl_neg 728988914
umodsu 734155435
expu 797104552
stoi 799118849
lg2prec 815997983
mpmul 835324154
rcopy 916853690
mpneg 926921221
affii 964943539
subrr 1006438890
cmpuu 1490485040
cgetg_copy 1492110464
cgetr 1875963300
togglesign 1953864294
minss 2028117998
absi 2068925527
mpabs 2139860944
setabssign 2207162728
Fl_sqr_pre 2337017994
nbits2lg 2402789257
expi 2425380335
Fl_mul 2437605979
addrr 2931400356
remii 3061729557
adduu 3450326021
stackdummy 3687765823
Fl_mul_pre 4215052973
leafcopy 5064078868
shift_right 5731344047
Fl_add 6143267121
dvmdsBIL 7149612253
Fl_sub 7406047906
Fl_addmul_pre 7651964111
subii 7720476259
shift_left 7797034908
uutoi 8938892218
icopy 9156382088
maxss 9715973001
utoi 12053343849
addii 12533256575
evalexpo 13397560029
utoipos 14269649278
gc_const 15654151786
cgetipos 16454102420
cgetg 25524920858
cgeti 27491095435
new_chunk 95141347899
evallg 96885767382
set_avma 131373327464

Generated by: LCOV version 1.16