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 30824-18397de1d0) Lines: 605 680 89.0 %
Date: 2026-04-19 09:25:48 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 33737
cmprs 40996
cgetr_block 44262
sdivsi 102149
stack_calloc 110682
gc_stoi 155901
dvdui 167195
subis 171739
Fl_ellj_pre 238051
mindd 264380
truedivis 268376
cmpri 302870
mod16 307027
Mod32 311108
uutoineg 362148
Mod16 389733
mpdiv 395374
cgetg_block 423656
gc_utoi 468825
dvdiu 576273
umodui 711392
cmpsr 796088
rdivss 839647
real2n 1068662
addri 1106260
equalis 1151216
equalsi 1151397
gc_utoipos 1153590
real_0 1157764
mpround 1216584
absrnz_equal2n 1301182
cmpss 1392943
Mod8 2073785
mpcmp 2156184
Mod2 2370071
udivuu_rem 2418379
gc_int 2739328
mulru 2765892
subir 3000048
equaliu 3021806
equalui 3021807
itou_or_0 3147017
maxdd 3211438
cmpis 3634389
negr 3683147
cmpsi 3866394
ceildivuu 3903140
Fl_center 4486193
absrnz_equal1 4556900
real_1_bit 4714229
mod4 5140229
subri 6095708
subsi 6184613
truedivsi 6202318
umuluu_or_0 6298990
affsi 6446416
maxuu 6610895
mulrs 7181596
fractor 7380422
umuluu_le 7617880
gc_NULL 7961529
cmpir 9444971
ugcdiu 10320259
affectsign_safe 10729170
uabsdiviu_rem 11892741
addrs 12364072
smodss 12497267
cmpiu 12980924
cmpui 12981093
rdivii 13106010
rdiviiz 13150653
mpabs_shallow 13428463
divii 14050684
utor 14266489
affur 14266596
mod8 15584575
subrs 16544456
dvdii 16900195
Fl_halve 18774321
modis 19638526
int_bit 20943472
smodis 21176088
hammingu 24048726
evalvalser 24359582
abscmpui 32330810
abscmpiu 32330911
mulri 38307280
mpexpo 38878202
absequaliu 39545831
absequalui 41295862
Mod4 43844851
itos_or_0 44911885
modsi 45242108
affui 45491533
Fl_div 46722495
stack_malloc 46923510
umodi2n 48988090
sdivsi_rem 51446736
gc_ulong 51693669
truedivii 54732542
stack_malloc_align 55537958
affrr_fixlg 56116057
absi_shallow 56374208
gc_bool 56794634
mod2 62589153
Fl_addmulmul_pre 64585625
minuu 69697436
remlll_pre 75651808
evalprecp 78673503
evalvalp 81629899
Fl_triple 87336589
mpsqr 90780211
addiu 96728097
Fl_sqr 99492051
addui 100803107
fixlg 105855826
mod2BIL 107442544
mpodd 116093092
icopyspec 118027457
subiu 133461639
real_1 133710114
subui 138438755
mpshift 153506337
togglesign_safe 157266183
dvmduBIL 165677432
itou 179081260
gc_double 184139300
shiftr 188189856
vali 191178818
addis 194795662
varncmp 199456707
gc_long 242673786
mpsub 249769196
utoineg 298134397
cgetineg 298995227
rtor 303776780
addsi 319980914
muliu 373220999
Fl_double 442640670
shiftr_inplace 466953948
mulis 467120033
itos 476303548
real_0_bit 482126217
addir 482815344
affsr 501361876
stor 501704981
mpadd 572602308
negi 641047536
itor 716909681
Fl_neg 729043510
umodsu 734167455
expu 797065168
stoi 799168723
lg2prec 815991047
mpmul 835403486
rcopy 916860570
mpneg 926934010
affii 964533409
subrr 1006494510
cmpuu 1490494296
cgetg_copy 1492127616
cgetr 1875941006
togglesign 1953822270
minss 2028011005
absi 2068988569
mpabs 2139920500
setabssign 2207227074
Fl_sqr_pre 2338377157
nbits2lg 2403088063
expi 2425137135
Fl_mul 2435045902
addrr 2931597700
remii 3061534590
adduu 3447558722
stackdummy 3681728125
Fl_mul_pre 4211907331
leafcopy 5064242968
shift_right 5731600993
Fl_add 6138072240
dvmdsBIL 7149694161
Fl_sub 7382701782
Fl_addmul_pre 7649236731
subii 7720325554
shift_left 7797304815
uutoi 8934579985
icopy 9156202823
maxss 9691886830
utoi 12046419435
addii 12532577236
evalexpo 13398771436
utoipos 14262525152
gc_const 15654306653
cgetipos 16447516510
cgetg 25516153443
cgeti 27481915209
new_chunk 95128993609
evallg 96862288990
set_avma 131352904739

Generated by: LCOV version 1.16