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 30622-caa25a75db) Lines: 605 680 89.0 %
Date: 2026-01-22 09:18:00 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
absr 140
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 2851
stack_calloc_align 3308
varnmin 15547
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33709
cgetr_block 40142
cmprs 40996
sdivsi 102148
stack_calloc 107260
gc_stoi 155853
dvdui 167195
subis 170917
Fl_ellj_pre 238026
mod16 241110
truedivis 257526
mindd 258451
cmpri 282310
Mod32 311108
uutoineg 361873
Mod16 389703
cgetg_block 406516
gc_utoi 461934
dvdiu 564208
mpdiv 638554
cmpsr 774380
rdivss 839647
gc_utoipos 1021321
real2n 1023657
addri 1033424
real_0 1127693
equalis 1144283
equalsi 1144466
mpround 1194201
absrnz_equal2n 1248747
umodui 1296269
cmpss 1379853
Mod8 2073926
mpcmp 2171649
Mod2 2370240
udivuu_rem 2415694
gc_int 2630545
mulru 2765892
equaliu 2972522
equalui 2972522
subir 2972840
maxdd 3016144
itou_or_0 3041389
cmpis 3630804
negr 3660970
ceildivuu 3805499
cmpsi 3862806
absrnz_equal1 4326109
Fl_center 4392885
real_1_bit 4508152
maxuu 4813269
mod4 5084114
umuluu_or_0 5420401
umuluu_le 5803291
subri 5847018
subsi 6093588
affsi 6148887
truedivsi 6202031
mulrs 7181596
fractor 7375889
gc_NULL 7847284
cmpir 9056985
ugcdiu 10065831
cmpiu 10131247
cmpui 10131256
affectsign_safe 10361729
uabsdiviu_rem 11892741
addrs 12117606
smodss 12440187
rdivii 13081727
rdiviiz 13125269
mod8 13163014
utor 13362594
affur 13362706
mpabs_shallow 13428463
divii 13952055
dvdii 16017662
subrs 16111707
Fl_halve 18710801
modis 19638526
int_bit 20909321
smodis 21176060
evalvalser 21527935
hammingu 23980231
abscmpiu 32368601
abscmpui 32368612
mulri 38004527
mpexpo 38157231
absequaliu 39614394
absequalui 41363305
Mod4 43219982
itos_or_0 43559115
Fl_div 44865925
modsi 45224970
affui 45464803
stack_malloc 46363973
truedivii 46401314
umodi2n 48363581
gc_bool 50887782
gc_ulong 50900122
sdivsi_rem 51429297
stack_malloc_align 53223770
affrr_fixlg 53869358
absi_shallow 57365839
mod2 58979846
Fl_addmulmul_pre 64527510
minuu 67748632
remlll_pre 75324956
evalprecp 78659762
evalvalp 81616395
mpsqr 89063433
Fl_triple 93871742
Fl_sqr 93975961
addiu 95277749
addui 98920933
mod2BIL 101147815
fixlg 103271767
mpodd 110813372
icopyspec 117089738
togglesign_safe 124072423
real_1 126850428
subiu 131196877
subui 136143650
mpshift 145576775
dvmduBIL 164558682
shiftr 175161440
itou 177115329
gc_double 177959498
addis 179170425
vali 188280726
varncmp 216545729
gc_long 241279812
mpsub 246038226
rtor 288101925
utoineg 292597946
cgetineg 293459686
addsi 304356597
muliu 373916317
shiftr_inplace 457493150
itos 459549816
mulis 461322254
Fl_double 465675747
real_0_bit 466898481
addir 471955734
affsr 478106931
stor 478405812
mpadd 561909151
negi 619475773
itor 697518675
Fl_neg 713953897
umodsu 723907779
expu 761096064
stoi 769332133
lg2prec 785539837
mpmul 819257160
rcopy 883846990
mpneg 892975769
affii 906518142
subrr 972261887
cgetg_copy 1451665306
cmpuu 1486311860
cgetr 1801538785
togglesign 1875918395
minss 1965234455
absi 2030749734
mpabs 2098541246
Fl_sqr_pre 2163385532
setabssign 2164587327
nbits2lg 2314948404
Fl_mul 2374725801
expi 2399817835
addrr 2824050566
remii 2973004090
adduu 3355389187
stackdummy 3550889043
Fl_mul_pre 4043591821
Fl_add 4322318993
leafcopy 4866642074
shift_right 5546145472
dvmdsBIL 6906643539
Fl_sub 7145496275
subii 7582424095
Fl_addmul_pre 7604893107
shift_left 7612198333
uutoi 8649116535
icopy 8960885489
maxss 9564932316
utoi 11685694429
addii 12254817112
evalexpo 12938363461
utoipos 13923935833
gc_const 15470222729
cgetipos 16072601558
cgetg 24094050736
cgeti 26738108019
new_chunk 92120999710
evallg 94085949848
set_avma 127583469311

Generated by: LCOV version 1.16