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 30786-ffec283a2b) Lines: 607 680 89.3 %
Date: 2026-04-07 09:25:56 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 19040
addss 25067
subss 25067
subuu 25067
dvdis 33737
cmprs 40996
cgetr_block 44272
sdivsi 102149
stack_calloc 110689
gc_stoi 155902
dvdui 167195
subis 171739
Fl_ellj_pre 238076
mindd 264380
truedivis 268389
cmpri 284263
mod16 307012
Mod32 311108
uutoineg 362081
Mod16 389733
cgetg_block 426411
gc_utoi 468819
dvdiu 576276
mpdiv 665513
umodui 711392
cmpsr 796090
rdivss 839647
real2n 1068597
addri 1106270
equalis 1151114
equalsi 1151296
gc_utoipos 1153543
real_0 1157700
mpround 1216582
absrnz_equal2n 1300300
cmpss 1392943
Mod8 2073975
mpcmp 2226343
Mod2 2370120
udivuu_rem 2418379
gc_int 2742469
mulru 2765892
subir 3004967
equaliu 3021714
equalui 3021716
itou_or_0 3147003
maxdd 3211536
cmpis 3634478
negr 3682541
cmpsi 3866477
ceildivuu 3904480
Fl_center 4486135
absrnz_equal1 4553854
real_1_bit 4713924
mod4 5140776
subri 6094025
subsi 6184697
truedivsi 6202087
umuluu_or_0 6252403
affsi 6446043
maxuu 6610955
mulrs 7181596
fractor 7379024
umuluu_le 7617880
gc_NULL 7962260
cmpir 9444787
ugcdiu 10321039
affectsign_safe 10729533
uabsdiviu_rem 11892741
addrs 12361065
smodss 12496392
cmpiu 12983186
cmpui 12983342
rdivii 13102006
rdiviiz 13147003
mpabs_shallow 13428463
divii 14050940
utor 14335024
affur 14335138
mod8 15586226
subrs 16536281
dvdii 16906130
Fl_halve 18766990
modis 19638526
int_bit 20952103
smodis 21176088
hammingu 24048727
evalvalser 24359582
abscmpui 33108524
abscmpiu 33108684
mulri 38284475
mpexpo 38877065
absequaliu 39545988
absequalui 41297051
Mod4 43853192
itos_or_0 44910069
modsi 45242126
affui 45491533
Fl_div 46705733
stack_malloc 46928602
umodi2n 48996746
sdivsi_rem 51446510
gc_ulong 52075621
truedivii 54738413
stack_malloc_align 55535054
affrr_fixlg 56107117
gc_bool 56788144
absi_shallow 57162680
mod2 62589094
Fl_addmulmul_pre 64565637
minuu 69656559
remlll_pre 75725586
evalprecp 78670007
evalvalp 81626644
Fl_triple 87145303
mpsqr 91031726
addiu 98284758
Fl_sqr 99473805
addui 102359678
fixlg 105717838
mod2BIL 107448202
mpodd 116092490
icopyspec 117798607
subiu 133395972
real_1 133636210
subui 138372154
mpshift 153481117
togglesign_safe 157287161
dvmduBIL 165611595
itou 179080549
gc_double 184100750
shiftr 187931215
vali 190836153
addis 194712979
varncmp 198761519
gc_long 242623443
mpsub 251568498
utoineg 297821070
cgetineg 298682067
rtor 303747367
addsi 319897972
muliu 373312491
Fl_double 442128176
shiftr_inplace 466940744
mulis 467114910
itos 476304929
real_0_bit 482443992
addir 483039640
affsr 501301515
stor 501641837
mpadd 573021223
negi 640845742
itor 716806572
Fl_neg 728875247
umodsu 734180795
expu 796838933
stoi 799048433
lg2prec 815894000
mpmul 837188661
rcopy 916735173
mpneg 926480934
affii 964712794
subrr 1006252188
cgetg_copy 1490090804
cmpuu 1490191257
cgetr 1875800206
togglesign 1953175506
minss 2026386328
absi 2066808153
mpabs 2137740228
setabssign 2204789388
Fl_sqr_pre 2338073169
nbits2lg 2402745811
expi 2424626603
Fl_mul 2437667800
addrr 2931088806
remii 3061745303
adduu 3449185310
stackdummy 3684435802
Fl_mul_pre 4218082316
leafcopy 5061315582
shift_right 5728535189
Fl_add 6146650627
dvmdsBIL 7147426817
Fl_sub 7399507095
Fl_addmul_pre 7652540761
subii 7719007533
shift_left 7795851885
uutoi 8937057251
icopy 9152177368
maxss 9708333081
utoi 12049676422
addii 12533142189
evalexpo 13395989404
utoipos 14262249484
gc_const 15648994638
cgetipos 16446485930
cgetg 25517058975
cgeti 27482055218
new_chunk 95101024576
evallg 96854905616
set_avma 131317033187

Generated by: LCOV version 1.16