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 30773-2078653b96) Lines: 607 680 89.3 %
Date: 2026-04-03 09:26:58 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
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 3313
stack_calloc_align 3325
varnmin 10374
uabsdivui_rem 16693
absr 19040
addss 25067
subss 25067
subuu 25067
dvdis 33737
cmprs 40996
cgetr_block 44243
sdivsi 102148
stack_calloc 110703
gc_stoi 155902
dvdui 167195
subis 171738
Fl_ellj_pre 238049
mindd 264383
truedivis 268374
cmpri 284263
mod16 307030
Mod32 311108
uutoineg 362248
Mod16 389733
cgetg_block 426426
gc_utoi 468772
dvdiu 576269
mpdiv 665519
umodui 711392
cmpsr 796105
rdivss 839647
real2n 1068597
addri 1106261
equalis 1151239
equalsi 1151421
gc_utoipos 1153574
real_0 1157756
mpround 1216590
absrnz_equal2n 1300260
cmpss 1392943
Mod8 2073895
mpcmp 2226377
Mod2 2370176
udivuu_rem 2418379
gc_int 2742566
mulru 2765892
subir 3004955
equaliu 3021721
equalui 3021722
itou_or_0 3147023
maxdd 3211492
cmpis 3634494
negr 3682580
cmpsi 3866492
ceildivuu 3903677
Fl_center 4486150
absrnz_equal1 4553901
real_1_bit 4713941
mod4 5140720
subri 6096932
subsi 6184733
truedivsi 6202031
umuluu_or_0 6271292
affsi 6446043
maxuu 6610970
mulrs 7181596
fractor 7379021
umuluu_le 7617880
gc_NULL 7962352
cmpir 9441217
ugcdiu 10320525
affectsign_safe 10731338
uabsdiviu_rem 11892741
addrs 12360957
smodss 12423682
cmpui 12981206
cmpiu 12981302
rdivii 13106571
rdiviiz 13149905
mpabs_shallow 13428463
divii 14053284
utor 14335014
affur 14335134
mod8 15586993
subrs 16536266
dvdii 16897493
Fl_halve 18776502
modis 19638526
int_bit 20941534
smodis 21176088
hammingu 24048737
evalvalser 24359582
abscmpiu 32363462
abscmpui 32363634
mulri 38284720
mpexpo 38875971
absequaliu 39546658
absequalui 41296672
Mod4 43845268
itos_or_0 44911224
modsi 45242143
affui 45491530
Fl_div 46833603
stack_malloc 46928783
umodi2n 48988068
sdivsi_rem 51446472
gc_ulong 52083707
truedivii 54737447
stack_malloc_align 55535087
affrr_fixlg 56108002
absi_shallow 56418246
gc_bool 56775380
mod2 62590076
Fl_addmulmul_pre 64606999
minuu 69575227
remlll_pre 75685286
evalprecp 78672114
evalvalp 81628914
Fl_triple 87151815
mpsqr 91028311
addiu 96786114
Fl_sqr 99468103
addui 100861082
fixlg 105718814
mod2BIL 107447187
mpodd 116095012
icopyspec 117797309
subiu 133395359
real_1 133640552
subui 138371215
mpshift 153494938
togglesign_safe 157293477
dvmduBIL 165774922
itou 179081419
gc_double 184187856
shiftr 187929234
vali 190832129
addis 194701531
varncmp 198760044
gc_long 242623901
mpsub 251588970
utoineg 297820380
cgetineg 298680992
rtor 303770538
addsi 319885396
muliu 373255824
Fl_double 441872537
shiftr_inplace 467099709
mulis 467132220
itos 476309885
real_0_bit 482032019
addir 483062663
affsr 501207494
stor 501613597
mpadd 572716164
negi 640778945
itor 716753222
Fl_neg 729152033
umodsu 734176845
expu 796830639
stoi 798862327
lg2prec 815710327
mpmul 836907240
rcopy 916793150
mpneg 926429926
affii 964391818
subrr 1006375993
cgetg_copy 1490130213
cmpuu 1490472821
cgetr 1875791991
togglesign 1953398473
minss 2025963479
absi 2067144858
mpabs 2138087647
setabssign 2205142110
Fl_sqr_pre 2337713937
nbits2lg 2402450154
expi 2424623061
Fl_mul 2437633455
addrr 2931325880
remii 3061000963
adduu 3446615676
stackdummy 3681464690
Fl_mul_pre 4228779574
leafcopy 5061732679
shift_right 5733190927
Fl_add 6143571101
dvmdsBIL 7149634742
Fl_sub 7380745718
Fl_addmul_pre 7672943541
subii 7718441896
shift_left 7795241799
uutoi 8931880296
icopy 9151572284
maxss 9691047390
utoi 12046742418
addii 12531886731
evalexpo 13391189448
utoipos 14264221377
gc_const 15648206064
cgetipos 16453812579
cgetg 25520957468
cgeti 27465360949
new_chunk 95113572535
evallg 96827653051
set_avma 131330516185

Generated by: LCOV version 1.16