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

Generated by: LCOV version 1.16