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 30587-f85873d515) Lines: 605 680 89.0 %
Date: 2025-12-27 09:21:13 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 43666
sdivsi 102150
stack_calloc 110377
gc_stoi 155886
dvdui 167195
subis 170920
Fl_ellj_pre 238044
mod16 241108
mindd 264325
truedivis 266955
cmpri 282310
Mod32 311108
uutoineg 362195
Mod16 389733
cgetg_block 407116
gc_utoi 468569
dvdiu 576263
mpdiv 665648
cmpsr 796106
rdivss 839647
real2n 1067020
addri 1105742
gc_utoipos 1153506
real_0 1156402
equalis 1181879
equalsi 1182061
mpround 1216577
absrnz_equal2n 1292727
umodui 1296276
cmpss 1379853
Mod8 2073977
mpcmp 2225733
udivuu_rem 2416412
Mod2 2479214
gc_int 2569988
mulru 2765892
subir 3005086
equalui 3018183
equaliu 3018207
itou_or_0 3041687
maxdd 3177237
cmpis 3634811
negr 3671227
cmpsi 3866814
ceildivuu 3881027
Fl_center 4486025
absrnz_equal1 4520527
real_1_bit 4704970
maxuu 4814831
mod4 4932359
umuluu_or_0 5533213
umuluu_le 5803291
subsi 6093389
subri 6116341
truedivsi 6202031
affsi 6373236
mulrs 7181596
fractor 7376769
gc_NULL 7960851
cmpir 9428919
ugcdiu 10105337
cmpiu 10119136
cmpui 10119151
affectsign_safe 10727748
uabsdiviu_rem 11892741
addrs 12305393
smodss 12531883
rdivii 13099699
rdiviiz 13144779
mod8 13163594
mpabs_shallow 13428463
utor 13461683
affur 13461791
divii 14043706
subrs 16475827
dvdii 16569121
Fl_halve 18774935
modis 19638526
int_bit 20964565
smodis 21176060
evalvalser 21527935
hammingu 24048382
abscmpiu 32386078
abscmpui 32386101
mulri 38033827
mpexpo 38874478
absequaliu 39660799
absequalui 41409730
itos_or_0 43597653
Mod4 43729895
modsi 45225553
affui 45473825
Fl_div 46531197
stack_malloc 46626847
truedivii 47022959
umodi2n 48984953
sdivsi_rem 51429879
gc_bool 51997073
gc_ulong 52053130
affrr_fixlg 54652869
stack_malloc_align 55490381
absi_shallow 57427364
mod2 61112857
Fl_addmulmul_pre 64537362
minuu 69037475
remlll_pre 75794067
evalprecp 78660651
evalvalp 81617391
mpsqr 91014626
Fl_triple 94271751
addiu 95432814
Fl_sqr 95881871
addui 99076662
mod2BIL 103152243
fixlg 104196309
mpodd 115076752
icopyspec 117080758
togglesign_safe 125622361
real_1 129805541
subiu 131485595
subui 136458221
mpshift 153172743
dvmduBIL 165806686
itou 177596078
shiftr 177973518
addis 181598068
gc_double 184188308
vali 190311626
varncmp 217206205
gc_long 242225748
mpsub 251526653
utoineg 293815810
cgetineg 294677357
rtor 295239395
addsi 306783279
muliu 371953858
itos 462124813
shiftr_inplace 464026458
mulis 464506079
Fl_double 467940781
real_0_bit 478997371
addir 480491753
affsr 486135715
stor 486435141
mpadd 574206665
negi 636800598
itor 713547900
Fl_neg 719267908
umodsu 723949598
stoi 772587498
expu 775247384
lg2prec 798460702
mpmul 837360184
rcopy 903105367
affii 910417401
mpneg 916727049
subrr 1000158603
cgetg_copy 1479979255
cmpuu 1492611036
cgetr 1838968338
togglesign 1911155684
minss 2009143462
absi 2067594176
mpabs 2138354567
Fl_sqr_pre 2170415979
setabssign 2205025041
nbits2lg 2365330135
Fl_mul 2418629729
expi 2446610745
addrr 2876596221
remii 3006250806
adduu 3411888752
stackdummy 3638568154
Fl_mul_pre 4079217182
Fl_add 4388871639
leafcopy 4972725410
shift_right 5628111421
dvmdsBIL 7005698603
Fl_sub 7255253700
subii 7657021746
Fl_addmul_pre 7658130171
shift_left 7674695006
uutoi 8810475006
icopy 9056444733
maxss 9693490752
utoi 11903512933
addii 12412299938
evalexpo 13129238646
utoipos 14145599404
gc_const 15491601727
cgetipos 16306742558
cgetg 24527338558
cgeti 27092251438
new_chunk 93183060944
evallg 95135400755
set_avma 128887006656

Generated by: LCOV version 1.16