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

Generated by: LCOV version 1.16