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

Generated by: LCOV version 1.16