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 30735-65f72320ad) Lines: 605 680 89.0 %
Date: 2026-03-11 09:24:10 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 25067
subss 25067
subuu 25067
dvdis 33730
cmprs 40996
cgetr_block 43773
sdivsi 102150
stack_calloc 110578
gc_stoi 155903
dvdui 167195
subis 171739
Fl_ellj_pre 238036
mindd 264384
truedivis 266967
cmpri 282310
mod16 307027
Mod32 311108
uutoineg 363474
Mod16 389733
cgetg_block 425307
gc_utoi 468690
dvdiu 576277
mpdiv 665534
cmpsr 796104
rdivss 839647
real2n 1067470
addri 1106147
equalis 1151084
equalsi 1151266
gc_utoipos 1153589
real_0 1156662
mpround 1216578
umodui 1290953
absrnz_equal2n 1292626
cmpss 1392943
Mod8 2074172
mpcmp 2226360
Mod2 2370163
udivuu_rem 2418379
gc_int 2631202
mulru 2765892
subir 3004953
equalui 3018939
equaliu 3018940
itou_or_0 3147032
maxdd 3179631
cmpis 3633502
negr 3671728
cmpsi 3865502
ceildivuu 3904474
Fl_center 4486195
absrnz_equal1 4520409
real_1_bit 4707125
maxuu 4815579
mod4 5139194
umuluu_le 5803291
subri 6091437
umuluu_or_0 6143036
subsi 6182696
truedivsi 6202031
affsi 6439503
mulrs 7181596
fractor 7376933
gc_NULL 7964809
cmpir 9438024
ugcdiu 10147555
affectsign_safe 10730030
uabsdiviu_rem 11892741
cmpiu 12183094
cmpui 12183131
addrs 12305343
smodss 12584895
rdivii 13104900
rdiviiz 13147105
mpabs_shallow 13428463
utor 13462967
affur 13463080
divii 14053435
mod8 15580145
subrs 16478342
dvdii 16902187
Fl_halve 18827032
modis 19638526
int_bit 20966279
smodis 21176081
evalvalser 21529069
hammingu 24048764
abscmpiu 32934950
abscmpui 32935034
mulri 38033933
mpexpo 38878183
absequaliu 39352812
absequalui 41101724
itos_or_0 43602063
Mod4 43860031
modsi 45225717
affui 45473825
Fl_div 46569477
stack_malloc 46825687
umodi2n 49004279
sdivsi_rem 51430045
gc_ulong 52071457
affrr_fixlg 54658143
truedivii 54708495
stack_malloc_align 55526081
gc_bool 56148883
absi_shallow 56901487
mod2 61230941
Fl_addmulmul_pre 64669546
minuu 69581838
remlll_pre 76140212
evalprecp 78676912
evalvalp 81633409
mpsqr 91039270
Fl_triple 91238550
addiu 97841852
Fl_sqr 99471430
addui 101489312
fixlg 104204436
mod2BIL 106068445
mpodd 115176213
icopyspec 117468531
real_1 129867411
subiu 131921924
subui 136896602
mpshift 153309668
togglesign_safe 157230038
dvmduBIL 161329636
shiftr 178088736
itou 178237846
gc_double 184174639
addis 184514189
vali 190428334
varncmp 198517390
gc_long 242535455
mpsub 251582677
rtor 295310863
utoineg 297201232
cgetineg 298062634
addsi 309700426
muliu 375566891
Fl_double 452941857
shiftr_inplace 464595187
mulis 467022108
itos 472277019
real_0_bit 477958358
addir 481448198
affsr 486306516
stor 486615653
mpadd 573150576
negi 640362073
itor 715244867
Fl_neg 723628594
umodsu 734177560
expu 775744103
stoi 796717004
lg2prec 800348896
mpmul 836414643
rcopy 903476732
mpneg 920365337
affii 958019783
subrr 1000317675
cgetg_copy 1487242490
cmpuu 1490449051
cgetr 1840990092
togglesign 1943597093
minss 2009606159
absi 2065989684
mpabs 2136844616
Fl_sqr_pre 2156252718
setabssign 2203543785
nbits2lg 2366205412
expi 2422258846
Fl_mul 2429415554
addrr 2876528833
remii 3019201545
adduu 3445488157
stackdummy 3655340196
Fl_mul_pre 4091267513
Fl_add 4400669100
leafcopy 4978650861
shift_right 5633522166
dvmdsBIL 7031967290
Fl_sub 7231398794
Fl_addmul_pre 7674265600
subii 7683207339
shift_left 7694548733
uutoi 8932403716
icopy 9058951199
maxss 9715312336
utoi 12047065135
addii 12543059583
evalexpo 13160458644
utoipos 14258840444
gc_const 15582636488
cgetipos 16420203828
cgetg 24521425721
cgeti 27277998423
new_chunk 93545106720
evallg 95372474580
set_avma 129524424827

Generated by: LCOV version 1.16