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 30678-a23e500d22) Lines: 605 680 89.0 %
Date: 2026-02-15 09:22:35 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 14728
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33709
cmprs 40996
cgetr_block 43810
sdivsi 102148
stack_calloc 110381
gc_stoi 155886
dvdui 167195
subis 170918
Fl_ellj_pre 238055
mod16 241109
mindd 264338
truedivis 266936
cmpri 282310
Mod32 311108
uutoineg 362983
Mod16 389733
cgetg_block 424979
gc_utoi 468595
dvdiu 576268
mpdiv 665642
cmpsr 796093
rdivss 839647
real2n 1067063
addri 1106228
gc_utoipos 1153463
real_0 1156515
equalis 1185587
equalsi 1185770
mpround 1216586
absrnz_equal2n 1292652
umodui 1296276
cmpss 1392943
Mod8 2073911
mpcmp 2226397
Mod2 2370234
udivuu_rem 2418330
gc_int 2631201
mulru 2765892
subir 3005094
equaliu 3018227
equalui 3018227
itou_or_0 3041722
maxdd 3178482
cmpis 3634878
negr 3671468
cmpsi 3866878
ceildivuu 3901915
Fl_center 4486151
absrnz_equal1 4519959
real_1_bit 4705048
maxuu 4815197
mod4 5084912
umuluu_or_0 5532903
umuluu_le 5803291
subsi 6093967
subri 6140441
truedivsi 6202031
affsi 6373366
mulrs 7181596
fractor 7376921
gc_NULL 7963193
cmpir 9433842
ugcdiu 10114005
cmpiu 10131267
cmpui 10131288
affectsign_safe 10727991
uabsdiviu_rem 11892741
addrs 12305086
smodss 12520863
rdivii 13103628
rdiviiz 13145333
mod8 13162171
mpabs_shallow 13428463
utor 13462031
affur 13462147
divii 14051963
subrs 16475957
dvdii 16560499
Fl_halve 18794840
modis 19638526
int_bit 20950912
smodis 21176060
evalvalser 21528999
hammingu 24048419
abscmpiu 32300803
abscmpui 32300949
mulri 38033714
mpexpo 38877288
absequaliu 39397834
absequalui 41146758
itos_or_0 43600559
Mod4 43793658
modsi 45225498
affui 45473825
Fl_div 46567468
stack_malloc 46625293
truedivii 47026440
umodi2n 48936636
sdivsi_rem 51429825
gc_bool 51982530
gc_ulong 52047037
affrr_fixlg 54654507
stack_malloc_align 55501320
absi_shallow 57349194
mod2 61112928
Fl_addmulmul_pre 64551087
minuu 69342907
remlll_pre 76249380
evalprecp 78674634
evalvalp 81631417
mpsqr 91032222
Fl_triple 94498970
addiu 95283024
Fl_sqr 95849946
addui 98927197
mod2BIL 103304319
fixlg 104198240
mpodd 115074931
icopyspec 117434254
togglesign_safe 125504790
real_1 129824884
subiu 131853351
subui 136826406
mpshift 153250998
dvmduBIL 165820066
shiftr 177981105
itou 178275901
addis 181590102
gc_double 184159403
vali 190381943
varncmp 217197837
gc_long 242458071
mpsub 251596766
utoineg 293977233
cgetineg 294838668
rtor 295254431
addsi 306775126
muliu 374463666
itos 462150873
shiftr_inplace 464436191
mulis 466296310
Fl_double 469550672
real_0_bit 479303189
addir 481446255
affsr 486192359
stor 486535029
mpadd 574494673
negi 636759985
itor 715143475
Fl_neg 723946548
umodsu 734135759
stoi 772838089
expu 775459102
lg2prec 800260249
mpmul 837742220
rcopy 903270697
affii 910227339
mpneg 916706330
subrr 1000240857
cgetg_copy 1480343426
cmpuu 1493007068
cgetr 1840633117
togglesign 1912115371
minss 2009439170
absi 2067525131
mpabs 2138321612
Fl_sqr_pre 2179018957
setabssign 2205040391
nbits2lg 2366609279
Fl_mul 2420027102
expi 2448636213
addrr 2877716153
remii 3005898688
adduu 3407595402
stackdummy 3639225811
Fl_mul_pre 4094491693
Fl_add 4405137069
leafcopy 4975625015
shift_right 5633972009
dvmdsBIL 7011883336
Fl_sub 7267609125
subii 7641501803
Fl_addmul_pre 7667928020
shift_left 7677322605
uutoi 8802860864
icopy 9051749703
maxss 9701199445
utoi 11887076929
addii 12403209300
evalexpo 13138278521
utoipos 14134996263
gc_const 15512460885
cgetipos 16299994660
cgetg 24552040385
cgeti 27082308679
new_chunk 93216528782
evallg 95199733654
set_avma 128988248933

Generated by: LCOV version 1.16