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 30552-d1d0643eee) Lines: 605 680 89.0 %
Date: 2025-11-23 09:22: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
absr 140
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 2851
stack_calloc_align 3307
varnmin 15547
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33709
cmprs 40996
cgetr_block 43869
sdivsi 102150
stack_calloc 110596
gc_stoi 155887
dvdui 167195
subis 170995
mod16 241355
Fl_ellj_pre 242625
truedivis 266826
mindd 270159
cmpri 282310
Mod32 311108
uutoineg 355611
Mod16 389733
cgetg_block 408360
gc_utoi 468546
dvdiu 576572
mpdiv 667707
cmpsr 796103
rdivss 839647
real2n 1067415
addri 1109312
gc_utoipos 1153865
real_0 1156792
equalis 1181615
equalsi 1181797
mpround 1216542
absrnz_equal2n 1292573
umodui 1296416
cmpss 1427033
Mod8 2073888
mpcmp 2227469
udivuu_rem 2416419
Mod2 2479201
gc_int 2574322
mulru 2765892
subir 3006687
equaliu 3018555
equalui 3018562
itou_or_0 3041675
maxdd 3182571
cmpis 3634864
negr 3670867
ceildivuu 3848174
cmpsi 3866863
Fl_center 4486491
absrnz_equal1 4519480
real_1_bit 4706449
maxuu 4815188
mod4 4932558
umuluu_or_0 5526605
umuluu_le 5803291
subsi 6117426
subri 6128612
truedivsi 6202031
affsi 6383517
mulrs 7181596
fractor 7376743
gc_NULL 7970110
cmpir 9425181
ugcdiu 10077025
cmpiu 10119290
cmpui 10119324
affectsign_safe 10737754
uabsdiviu_rem 11892741
addrs 12304626
smodss 12538778
rdivii 13099867
rdiviiz 13145851
mod8 13271922
mpabs_shallow 13428463
utor 13463396
affur 13463505
divii 14058594
subrs 16476442
dvdii 16557476
Fl_halve 18020969
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22315324
hammingu 24048614
abscmpui 33407149
abscmpiu 33407282
mulri 38033855
mpexpo 38857129
absequaliu 39660512
absequalui 41409455
itos_or_0 43597033
Mod4 43775041
modsi 45225540
affui 45473825
Fl_div 46535832
stack_malloc 46643857
truedivii 46804758
umodi2n 49027360
sdivsi_rem 51429868
gc_bool 51999038
gc_ulong 52175647
affrr_fixlg 54649145
stack_malloc_align 55489706
absi_shallow 58464142
Fl_addmulmul_pre 60020941
mod2 61153921
minuu 69094546
remlll_pre 75624889
evalprecp 78665198
evalvalp 81622236
mpsqr 90974587
Fl_sqr 94878333
Fl_triple 95292981
addiu 97496260
addui 101146062
mod2BIL 103593286
fixlg 104147011
mpodd 115086541
icopyspec 117030043
togglesign_safe 125511269
real_1 129804739
subiu 131687789
subui 136672770
mpshift 153180763
dvmduBIL 165786925
itou 177093134
shiftr 177977554
addis 181571365
gc_double 184433652
vali 190346469
varncmp 217212674
gc_long 242070099
mpsub 251515388
utoineg 294177521
cgetineg 295035055
rtor 295272883
addsi 306753676
muliu 373518061
itos 462058212
mulis 463131081
shiftr_inplace 463740958
Fl_double 469322375
real_0_bit 478729469
addir 479885014
affsr 486040035
stor 486341202
mpadd 574019512
negi 636681656
itor 713188954
Fl_neg 716548985
umodsu 724224223
stoi 772621528
expu 775315661
lg2prec 797882397
mpmul 837118211
rcopy 902743463
affii 909071094
mpneg 916631405
subrr 1000131254
cgetg_copy 1479806422
cmpuu 1492637310
cgetr 1838493442
togglesign 1910927634
minss 2008542321
absi 2060554759
mpabs 2131342546
Fl_sqr_pre 2153750565
setabssign 2198024080
nbits2lg 2362716535
Fl_mul 2416025192
expi 2453296463
addrr 2875279036
remii 3012357185
adduu 3413012313
stackdummy 3646940754
Fl_mul_pre 4084459227
Fl_add 4386953215
leafcopy 4964921233
shift_right 5625329828
dvmdsBIL 7013215764
Fl_sub 7299754221
subii 7664425594
shift_left 7682529056
Fl_addmul_pre 7691771626
uutoi 8809375121
icopy 9055526051
maxss 9738106304
utoi 11902507568
addii 12406250095
evalexpo 13123247328
utoipos 14146643032
gc_const 15513699081
cgetipos 16305373188
cgetg 24538336206
cgeti 27131626835
new_chunk 93254584375
evallg 95225899663
set_avma 128995308472

Generated by: LCOV version 1.16