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 30580-ef5a862e7f) Lines: 605 680 89.0 %
Date: 2025-12-19 09:23:05 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 43809
sdivsi 102150
stack_calloc 110592
gc_stoi 155885
dvdui 167195
subis 170967
mod16 241369
Fl_ellj_pre 246629
truedivis 266964
mindd 269923
cmpri 282310
Mod32 311108
uutoineg 358502
Mod16 389733
cgetg_block 409132
gc_utoi 468659
dvdiu 576618
mpdiv 667475
cmpsr 796103
rdivss 839647
real2n 1067383
addri 1108692
gc_utoipos 1154058
real_0 1156772
equalis 1181819
equalsi 1182002
mpround 1216580
absrnz_equal2n 1292725
umodui 1296458
cmpss 1446078
Mod8 2074007
mpcmp 2227545
udivuu_rem 2416419
Mod2 2479331
gc_int 2574591
mulru 2765892
subir 3006525
equaliu 3018594
equalui 3018594
itou_or_0 3041686
maxdd 3184409
cmpis 3634948
negr 3671383
cmpsi 3866947
ceildivuu 3917692
Fl_center 4486819
absrnz_equal1 4520632
real_1_bit 4706018
maxuu 4815588
mod4 4933264
umuluu_or_0 5513434
umuluu_le 5803291
subri 6086656
subsi 6149813
truedivsi 6202031
affsi 6394758
mulrs 7181596
fractor 7376762
gc_NULL 7976184
cmpir 9446582
ugcdiu 10105555
cmpiu 10119661
cmpui 10119710
affectsign_safe 10744339
uabsdiviu_rem 11892741
addrs 12306548
smodss 12554468
rdivii 13102584
rdiviiz 13147391
mod8 13321276
mpabs_shallow 13428463
utor 13463209
affur 13463305
divii 14050471
subrs 16478244
dvdii 16574503
Fl_halve 18774182
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22276527
hammingu 24048847
abscmpiu 32197702
abscmpui 32197727
mulri 38033705
mpexpo 38880798
absequaliu 39661447
absequalui 41410380
itos_or_0 43598963
Mod4 43778681
modsi 45225563
affui 45473825
Fl_div 46583342
stack_malloc 46646589
truedivii 47001553
umodi2n 49032258
sdivsi_rem 51429891
gc_bool 52016476
gc_ulong 52426292
affrr_fixlg 54656266
stack_malloc_align 55505575
absi_shallow 57260887
mod2 61167599
Fl_addmulmul_pre 63741054
minuu 69352991
remlll_pre 75596242
evalprecp 78666700
evalvalp 81623276
mpsqr 91039007
addiu 95082250
Fl_sqr 96115554
Fl_triple 97425292
addui 98732409
mod2BIL 103694221
fixlg 104206155
mpodd 115091843
icopyspec 117098784
togglesign_safe 125654177
real_1 129802610
subiu 131690948
subui 136685310
mpshift 153176046
dvmduBIL 163339491
itou 177605039
shiftr 178000890
addis 181616861
gc_double 184328080
vali 190500807
varncmp 217216456
gc_long 242324637
mpsub 251570956
utoineg 294965177
rtor 295285905
cgetineg 295824746
addsi 306802199
muliu 373724686
itos 462400545
shiftr_inplace 464048831
mulis 464541648
Fl_double 477131467
addir 480537064
real_0_bit 481199930
affsr 486187117
stor 486472858
mpadd 576209529
negi 636823746
itor 713560559
Fl_neg 719435149
umodsu 724409011
stoi 772970077
expu 775592954
lg2prec 798336534
mpmul 839393679
rcopy 903181081
affii 910370225
mpneg 916761273
subrr 1000230327
cgetg_copy 1480464205
cmpuu 1492724180
cgetr 1839060005
togglesign 1912925610
minss 2008915625
absi 2067665316
mpabs 2138479204
Fl_sqr_pre 2181605855
setabssign 2205162528
nbits2lg 2366771908
Fl_mul 2418411240
expi 2457482702
addrr 2878437733
remii 3015203091
adduu 3414580575
stackdummy 3646357941
Fl_mul_pre 4107457421
Fl_add 4405699893
leafcopy 4973370714
shift_right 5628602036
dvmdsBIL 7018003437
Fl_sub 7297968410
subii 7668125033
Fl_addmul_pre 7678104829
shift_left 7686486088
uutoi 8819414942
icopy 9060895202
maxss 9726652382
utoi 11912883632
addii 12419073566
evalexpo 13131502760
utoipos 14163310771
gc_const 15526729345
cgetipos 16325845560
cgetg 24553235746
cgeti 27161074177
new_chunk 93323293303
evallg 95291845968
set_avma 129084161988

Generated by: LCOV version 1.16