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 30842-de08e65e1b) Lines: 605 680 89.0 %
Date: 2026-04-29 09:26:11 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 33751
cmprs 40996
cgetr_block 44279
sdivsi 102150
stack_calloc 110684
gc_stoi 155895
dvdui 167195
subis 171740
Fl_ellj_pre 238040
mindd 264380
truedivis 268361
cmpri 303003
mod16 307019
Mod32 311108
uutoineg 362192
Mod16 389733
mpdiv 395508
cgetg_block 424606
gc_utoi 468805
dvdiu 576278
umodui 711392
cmpsr 796127
rdivss 839647
real2n 1068670
addri 1111436
equalis 1151251
equalsi 1151433
gc_utoipos 1153568
real_0 1159262
mpround 1216580
absrnz_equal2n 1301176
cmpss 1392943
Mod8 2073913
mpcmp 2161410
Mod2 2370267
udivuu_rem 2418379
gc_int 2739537
mulru 2765892
subir 3000327
equaliu 3021965
equalui 3021965
itou_or_0 3146274
maxdd 3211569
cmpis 3634589
negr 3683131
cmpsi 3866585
ceildivuu 3901959
Fl_center 4489086
absrnz_equal1 4556849
real_1_bit 4714524
mod4 5141115
subri 6084213
subsi 6184506
truedivsi 6202318
umuluu_or_0 6299141
affsi 6447548
maxuu 6610562
mulrs 7181596
fractor 7379551
umuluu_le 7617880
gc_NULL 7964504
cmpir 9444332
ugcdiu 10320161
affectsign_safe 10730881
uabsdiviu_rem 11892741
addrs 12363894
smodss 12443026
cmpiu 12967464
cmpui 12967557
rdivii 13104806
rdiviiz 13149720
mpabs_shallow 13428463
divii 14043406
utor 14267934
affur 14268048
mod8 15583415
subrs 16544454
dvdii 16893810
Fl_halve 18772336
modis 19638526
int_bit 20920657
smodis 21176102
hammingu 24048812
evalvalser 24359743
abscmpiu 33741995
abscmpui 33742131
mulri 38306399
mpexpo 38873348
absequaliu 39546767
absequalui 41296786
Mod4 43842914
itos_or_0 44912471
modsi 45242146
affui 45491529
Fl_div 46847560
stack_malloc 46928517
umodi2n 48986151
sdivsi_rem 51446760
gc_ulong 51681112
truedivii 54726567
stack_malloc_align 55534243
affrr_fixlg 56114927
gc_bool 56805788
absi_shallow 57794822
mod2 62590216
Fl_addmulmul_pre 64493420
minuu 69718488
remlll_pre 75611005
evalprecp 78671250
evalvalp 81627472
Fl_triple 86967933
mpsqr 90764290
Fl_sqr 99457282
addiu 99552155
addui 103625507
fixlg 105864336
mod2BIL 107442751
mpodd 116094948
icopyspec 118071673
subiu 133447391
real_1 133700602
subui 138424317
mpshift 153509769
togglesign_safe 157252484
dvmduBIL 163680141
itou 179086799
gc_double 184189984
shiftr 188172816
vali 191293930
addis 194751510
varncmp 199680253
gc_long 242687630
mpsub 249676292
utoineg 298260919
cgetineg 299121816
rtor 303790271
addsi 319936630
muliu 373359604
Fl_double 441192767
shiftr_inplace 467079568
mulis 467116719
itos 476315591
real_0_bit 481803607
addir 482818811
affsr 501254920
stor 501689634
mpadd 572214765
negi 641036551
itor 716826322
Fl_neg 728883178
umodsu 734148893
expu 797125501
stoi 799169721
lg2prec 815873081
mpmul 834900483
rcopy 916857203
mpneg 926922195
affii 964717290
subrr 1006453880
cmpuu 1490530752
cgetg_copy 1493177751
cgetr 1875723450
togglesign 1953975046
minss 2028001557
absi 2070391781
mpabs 2141330972
setabssign 2208713604
Fl_sqr_pre 2336316105
nbits2lg 2402546246
expi 2426064855
Fl_mul 2437761287
addrr 2931201173
remii 3061271067
adduu 3449493867
stackdummy 3690849760
Fl_mul_pre 4210516598
leafcopy 5065238729
shift_right 5734993163
Fl_add 6132013047
dvmdsBIL 7151018436
Fl_sub 7407885366
Fl_addmul_pre 7653859976
subii 7718123500
shift_left 7795811053
uutoi 8932495247
icopy 9156772849
maxss 9713935716
utoi 12050944584
addii 12531974237
evalexpo 13391992261
utoipos 14271822657
gc_const 15655878412
cgetipos 16457888047
cgetg 25541627287
cgeti 27472481351
new_chunk 95154762071
evallg 96891899263
set_avma 131399655252

Generated by: LCOV version 1.16