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 30604-e5d817ee12) Lines: 605 680 89.0 %
Date: 2026-01-08 09:21:40 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 43798
sdivsi 102150
stack_calloc 110353
gc_stoi 155889
dvdui 167195
subis 170919
Fl_ellj_pre 238033
mod16 241099
mindd 264339
truedivis 266944
cmpri 282310
Mod32 311108
uutoineg 361829
Mod16 389733
cgetg_block 407180
gc_utoi 468555
dvdiu 576268
mpdiv 665637
cmpsr 796097
rdivss 839647
real2n 1067032
addri 1105773
gc_utoipos 1153478
real_0 1156388
equalis 1185548
equalsi 1185730
mpround 1216595
absrnz_equal2n 1292598
umodui 1296276
cmpss 1379853
Mod8 2073924
mpcmp 2225863
Mod2 2370236
udivuu_rem 2416412
gc_int 2631160
mulru 2765892
subir 3005100
equaliu 3018207
equalui 3018207
itou_or_0 3041724
maxdd 3178508
cmpis 3634904
negr 3671334
cmpsi 3866903
ceildivuu 3900320
Fl_center 4486163
absrnz_equal1 4519873
real_1_bit 4704922
maxuu 4815138
mod4 5083872
umuluu_or_0 5516974
umuluu_le 5803291
subsi 6093512
subri 6132214
truedivsi 6202031
affsi 6373131
mulrs 7181596
fractor 7376772
gc_NULL 7962302
cmpir 9429573
ugcdiu 10113948
cmpiu 10131754
cmpui 10131774
affectsign_safe 10727425
uabsdiviu_rem 11892741
addrs 12304803
smodss 12508659
rdivii 13103693
rdiviiz 13146766
mod8 13162626
mpabs_shallow 13428463
utor 13461794
affur 13461898
divii 14050288
subrs 16475488
dvdii 16562278
Fl_halve 18788532
modis 19638526
int_bit 20953491
smodis 21176060
evalvalser 21527935
hammingu 24048483
abscmpiu 33405671
abscmpui 33405847
mulri 38033597
mpexpo 38874009
absequaliu 39660844
absequalui 41409662
itos_or_0 43599838
Mod4 43774927
modsi 45225540
affui 45473824
Fl_div 46538632
stack_malloc 46626895
truedivii 47030063
umodi2n 48918417
sdivsi_rem 51429867
gc_bool 51984179
gc_ulong 52053107
affrr_fixlg 54653774
stack_malloc_align 55498309
absi_shallow 58456107
mod2 61113486
Fl_addmulmul_pre 64614946
minuu 69244965
remlll_pre 75706033
evalprecp 78667317
evalvalp 81624652
mpsqr 91020813
Fl_triple 94242420
Fl_sqr 95835914
addiu 97494004
addui 101138013
mod2BIL 103304254
fixlg 104197240
mpodd 115077594
icopyspec 117424754
togglesign_safe 125512412
real_1 129814113
subiu 131843343
subui 136816419
mpshift 153197492
dvmduBIL 165758824
shiftr 177968671
itou 178232899
addis 181499510
gc_double 184167854
vali 190376532
varncmp 217202923
gc_long 242311833
mpsub 251574611
utoineg 293942695
cgetineg 294804144
rtor 295244533
addsi 306681804
muliu 374452419
itos 462148534
shiftr_inplace 464311361
mulis 466261093
Fl_double 468412366
real_0_bit 479013870
addir 481426620
affsr 486079788
stor 486449660
mpadd 574211824
negi 636794426
itor 714826485
Fl_neg 719323369
umodsu 723920991
stoi 772662213
expu 775354886
lg2prec 799820313
mpmul 837409542
rcopy 903209587
affii 910239514
mpneg 916722410
subrr 1000216764
cgetg_copy 1480078513
cmpuu 1492639029
cgetr 1840131319
togglesign 1912015737
minss 2009613402
absi 2068416998
mpabs 2139195378
Fl_sqr_pre 2174249989
setabssign 2205914142
nbits2lg 2365873974
Fl_mul 2420447943
expi 2448710741
addrr 2876856842
remii 3004847192
adduu 3410754189
stackdummy 3644586305
Fl_mul_pre 4086430380
Fl_add 4398470532
leafcopy 4973697259
shift_right 5632124173
dvmdsBIL 7010136491
Fl_sub 7278502503
subii 7654069031
Fl_addmul_pre 7663185185
shift_left 7675890832
uutoi 8810162855
icopy 9051867676
maxss 9713585713
utoi 11901402257
addii 12403499043
evalexpo 13133434169
utoipos 14148774646
gc_const 15509373336
cgetipos 16314383992
cgetg 24555725442
cgeti 27097285136
new_chunk 93228879722
evallg 95217111973
set_avma 128992922846

Generated by: LCOV version 1.16