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 30734-f1f26dedcb) Lines: 605 680 89.0 %
Date: 2026-03-06 09:24:29 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 3307
varnmin 10374
uabsdivui_rem 16693
addss 24997
subss 24997
subuu 24997
dvdis 33730
cmprs 40996
cgetr_block 43794
sdivsi 102080
stack_calloc 110560
gc_stoi 155897
dvdui 167195
subis 171669
Fl_ellj_pre 238058
mindd 264382
truedivis 266970
cmpri 282310
mod16 307031
Mod32 311108
uutoineg 363581
Mod16 389733
cgetg_block 425235
gc_utoi 468706
dvdiu 576278
mpdiv 665507
cmpsr 796094
rdivss 839647
real2n 1067469
addri 1106260
equalis 1151100
equalsi 1151283
gc_utoipos 1153571
real_0 1156613
mpround 1216601
umodui 1291821
absrnz_equal2n 1292655
cmpss 1392943
Mod8 2074198
mpcmp 2226365
Mod2 2370122
udivuu_rem 2418379
gc_int 2631187
mulru 2765892
subir 3004962
equaliu 3018743
equalui 3018744
itou_or_0 3146877
maxdd 3179458
cmpis 3633542
negr 3671914
cmpsi 3865540
ceildivuu 3905361
Fl_center 4486193
absrnz_equal1 4520390
real_1_bit 4707058
maxuu 4815500
mod4 5139063
umuluu_le 5803291
subri 6092860
umuluu_or_0 6155086
subsi 6182751
truedivsi 6202031
affsi 6439528
mulrs 7181596
fractor 7376930
gc_NULL 7962701
cmpir 9438915
ugcdiu 10147182
affectsign_safe 10728882
uabsdiviu_rem 11892741
cmpiu 12180053
cmpui 12180117
addrs 12305269
smodss 12656306
rdivii 13105922
rdiviiz 13148326
mpabs_shallow 13428463
utor 13463063
affur 13463172
divii 14060985
mod8 15578672
subrs 16478267
dvdii 16901219
Fl_halve 18829730
modis 19638526
int_bit 20974482
smodis 21176081
evalvalser 21529069
hammingu 24048703
abscmpui 33743573
abscmpiu 33743623
mulri 38033812
mpexpo 38879315
absequaliu 39352835
absequalui 41101756
itos_or_0 43601714
Mod4 43861819
modsi 45225731
affui 45473825
Fl_div 46553941
stack_malloc 46825388
umodi2n 49008368
sdivsi_rem 51430062
gc_ulong 52089257
affrr_fixlg 54657780
truedivii 54708379
stack_malloc_align 55527145
gc_bool 56142621
absi_shallow 57710541
mod2 61230283
Fl_addmulmul_pre 64721146
minuu 69654997
remlll_pre 76030304
evalprecp 78666660
evalvalp 81623263
mpsqr 91041632
Fl_triple 91458830
addiu 99454901
Fl_sqr 99499046
addui 103102475
fixlg 104203939
mod2BIL 106065288
mpodd 115174891
icopyspec 117468559
real_1 129869546
subiu 131923318
subui 136897863
mpshift 153309086
togglesign_safe 157199519
dvmduBIL 159243297
shiftr 178095256
itou 178237044
gc_double 184146854
addis 184552739
vali 190427132
varncmp 198513182
gc_long 242528222
mpsub 251591156
rtor 295314766
utoineg 297088940
cgetineg 297949508
addsi 309739353
muliu 375629322
Fl_double 454099013
shiftr_inplace 464550447
mulis 467010241
itos 472277226
real_0_bit 477921125
addir 481447696
affsr 486265665
stor 486577775
mpadd 573134285
negi 640282289
itor 715089899
Fl_neg 723525059
umodsu 734200934
expu 775737387
stoi 796851975
lg2prec 800094447
mpmul 836394315
rcopy 903512737
mpneg 920295699
affii 957435740
subrr 1000388035
cgetg_copy 1487102394
cmpuu 1490450495
cgetr 1840954985
togglesign 1943285461
minss 2008331071
absi 2066035911
mpabs 2136881821
Fl_sqr_pre 2156401180
setabssign 2203579420
nbits2lg 2365863311
expi 2420799319
Fl_mul 2430919084
addrr 2876808762
remii 3017723190
adduu 3446287458
stackdummy 3657098957
Fl_mul_pre 4094375454
Fl_add 4398568978
leafcopy 4977717347
shift_right 5633544750
dvmdsBIL 7032524540
Fl_sub 7254105625
Fl_addmul_pre 7681751653
subii 7682249486
shift_left 7695005264
uutoi 8933928601
icopy 9057221444
maxss 9735956061
utoi 12047561149
addii 12543064012
evalexpo 13160624288
utoipos 14257998404
gc_const 15582611587
cgetipos 16426247241
cgetg 24529638308
cgeti 27272137715
new_chunk 93564266475
evallg 95365095293
set_avma 129539388370

Generated by: LCOV version 1.16