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 30569-8181146aa1) Lines: 605 680 89.0 %
Date: 2025-12-02 09:22:09 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 43832
sdivsi 102149
stack_calloc 110584
gc_stoi 155883
dvdui 167195
subis 170993
mod16 241353
Fl_ellj_pre 242609
truedivis 267016
mindd 270163
cmpri 282310
Mod32 311108
uutoineg 354952
Mod16 389733
cgetg_block 408504
gc_utoi 468552
dvdiu 576582
mpdiv 667751
cmpsr 796102
rdivss 839647
real2n 1067481
addri 1109446
gc_utoipos 1153882
real_0 1156777
equalis 1182015
equalsi 1182197
mpround 1216602
absrnz_equal2n 1292775
umodui 1296416
cmpss 1427033
Mod8 2073999
mpcmp 2227730
udivuu_rem 2416426
Mod2 2479212
gc_int 2574297
mulru 2765892
subir 3006748
equaliu 3018591
equalui 3018591
itou_or_0 3041665
maxdd 3183964
cmpis 3634830
negr 3671380
cmpsi 3866832
ceildivuu 3908315
Fl_center 4486493
absrnz_equal1 4520814
real_1_bit 4706477
maxuu 4815365
mod4 4932803
umuluu_or_0 5521745
umuluu_le 5803291
subsi 6117251
subri 6134957
truedivsi 6202031
affsi 6383828
mulrs 7181596
fractor 7376757
gc_NULL 7974726
cmpir 9434265
ugcdiu 10105807
cmpui 10120231
cmpiu 10120276
affectsign_safe 10737606
uabsdiviu_rem 11892741
addrs 12307139
smodss 12508009
rdivii 13099377
rdiviiz 13142911
mod8 13272046
mpabs_shallow 13428463
utor 13463421
affur 13463512
divii 14056317
subrs 16479198
dvdii 16573311
Fl_halve 18027469
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22288657
hammingu 24048552
abscmpui 32989563
abscmpiu 32989674
mulri 38033906
mpexpo 38885180
absequaliu 39660963
absequalui 41409875
itos_or_0 43597530
Mod4 43779489
modsi 45225503
affui 45473825
Fl_div 46460390
stack_malloc 46645676
truedivii 47033069
umodi2n 49032143
sdivsi_rem 51429830
gc_bool 52022729
gc_ulong 52159947
affrr_fixlg 54655604
stack_malloc_align 55515039
absi_shallow 58053179
Fl_addmulmul_pre 60073960
mod2 61159117
minuu 69180597
remlll_pre 75488534
evalprecp 78665365
evalvalp 81621765
mpsqr 91044919
Fl_sqr 94869221
Fl_triple 94989401
addiu 96671652
addui 100321453
mod2BIL 103595023
fixlg 104153621
mpodd 115095717
icopyspec 117100047
togglesign_safe 125671043
real_1 129833573
subiu 131694970
subui 136680112
mpshift 153226385
dvmduBIL 165592544
itou 177608124
shiftr 178002776
addis 181627261
gc_double 184415912
vali 190482758
varncmp 217214667
gc_long 242316297
mpsub 251645306
utoineg 294393137
cgetineg 295250352
rtor 295289545
addsi 306813433
muliu 373536596
itos 462331352
shiftr_inplace 463839732
mulis 464530283
Fl_double 467961182
real_0_bit 479281388
addir 480573722
affsr 486151116
stor 486448261
mpadd 574561398
negi 636846586
itor 713719113
Fl_neg 716139826
umodsu 724155872
stoi 772637159
expu 775483924
lg2prec 798399601
mpmul 837797417
rcopy 903234925
affii 910235544
mpneg 916800151
subrr 1000269452
cgetg_copy 1480430932
cmpuu 1492700338
cgetr 1839142665
togglesign 1912416434
minss 2008922884
absi 2067695915
mpabs 2138488773
Fl_sqr_pre 2154129546
setabssign 2205162794
nbits2lg 2363615271
Fl_mul 2414386400
expi 2453657036
addrr 2877020127
remii 3011888110
adduu 3414567878
stackdummy 3643259703
Fl_mul_pre 4081734811
Fl_add 4379695348
leafcopy 4973725301
shift_right 5626043258
dvmdsBIL 7015199357
Fl_sub 7290704220
subii 7665752289
Fl_addmul_pre 7674090068
shift_left 7684059529
uutoi 8815064229
icopy 9057853305
maxss 9732353311
utoi 11907168681
addii 12412059401
evalexpo 13130483305
utoipos 14154137833
gc_const 15517333263
cgetipos 16317564450
cgetg 24538263151
cgeti 27145528487
new_chunk 93271434081
evallg 95255732410
set_avma 129025199291

Generated by: LCOV version 1.16