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 30530-11e908049b) Lines: 605 680 89.0 %
Date: 2025-10-13 09:22: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
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 33912
cmprs 40996
cgetr_block 43646
sdivsi 102150
stack_calloc 110604
gc_stoi 155886
dvdui 167195
subis 170994
mod16 241356
Fl_ellj_pre 242635
truedivis 266823
mindd 270163
cmpri 282310
Mod32 311108
uutoineg 355373
Mod16 389733
cgetg_block 393711
gc_utoi 468567
dvdiu 576570
mpdiv 667694
cmpsr 795896
rdivss 839647
real2n 1067417
addri 1109332
gc_utoipos 1153843
real_0 1156086
equalis 1181679
equalsi 1181862
mpround 1216541
absrnz_equal2n 1291383
umodui 1296416
cmpss 1427033
Mod8 2075129
mpcmp 2227525
udivuu_rem 2416391
Mod2 2479841
gc_int 2574242
mulru 2765822
subir 3006674
equaliu 3018656
equalui 3018656
itou_or_0 3041671
maxdd 3176153
cmpis 3633554
negr 3670323
ceildivuu 3847764
cmpsi 3865528
Fl_center 4485518
absrnz_equal1 4517954
mod4 4700747
real_1_bit 4706066
maxuu 4804829
umuluu_or_0 5529799
umuluu_le 5803235
subri 6096313
subsi 6117352
truedivsi 6202031
affsi 6383343
mulrs 7181596
fractor 7376017
gc_NULL 7968924
cmpir 9446585
ugcdiu 10082752
cmpiu 10120670
cmpui 10120698
affectsign_safe 10736077
uabsdiviu_rem 11892741
addrs 12303333
smodss 12549910
rdivii 13097946
rdiviiz 13142739
mod8 13272816
mpabs_shallow 13428463
utor 13462552
affur 13462655
divii 14057408
subrs 16475284
dvdii 16551126
Fl_halve 18026012
modis 19638526
smodis 21176263
evalvalser 21443044
int_bit 22276101
hammingu 24045800
abscmpiu 33157220
abscmpui 33157270
mulri 38033028
mpexpo 38854936
absequaliu 39662923
absequalui 41411823
itos_or_0 43594857
Mod4 44367883
modsi 45225532
affui 45473825
Fl_div 46523793
stack_malloc 46641419
truedivii 46783838
umodi2n 49623504
sdivsi_rem 51429859
gc_bool 51991031
gc_ulong 52165691
stack_malloc_align 55489190
affrr_fixlg 55830251
absi_shallow 58213386
Fl_addmulmul_pre 60109325
mod2 61153179
minuu 68971887
remlll_pre 75461511
evalprecp 78670343
evalvalp 81627584
mpsqr 90984297
Fl_sqr 94873630
Fl_triple 95609512
addiu 96762511
addui 100412296
mod2BIL 103362007
fixlg 105327782
mpodd 115082754
icopyspec 117026401
togglesign_safe 125522124
real_1 131247476
subiu 131674750
subui 136368282
mpshift 153176678
dvmduBIL 165752618
itou 177092463
shiftr 181109855
addis 181796199
gc_double 184309717
vali 190340751
varncmp 217203353
gc_long 241812785
mpsub 251500238
utoineg 294168524
cgetineg 295026019
rtor 300596940
addsi 306979540
muliu 373412895
itos 461683067
mulis 463149587
Fl_double 474356546
shiftr_inplace 478399889
addir 479827177
real_0_bit 481182247
affsr 495484944
stor 495796438
mpadd 576190125
negi 637462806
itor 713095519
Fl_neg 716544074
umodsu 724205404
stoi 772632778
expu 787276995
lg2prec 807413809
mpmul 839294113
rcopy 905806915
affii 909215508
mpneg 917867789
subrr 1001232229
cgetg_copy 1479711971
cmpuu 1492991143
cgetr 1857176985
togglesign 1914454265
minss 2009149623
absi 2060274334
mpabs 2131065849
Fl_sqr_pre 2163231601
setabssign 2197739605
nbits2lg 2383014434
Fl_mul 2414948300
expi 2453848887
addrr 2883991062
remii 3012280586
adduu 3412392852
stackdummy 3643661960
Fl_mul_pre 4086246369
Fl_add 4356942223
leafcopy 4968655054
shift_right 5669987026
dvmdsBIL 7089403315
Fl_sub 7298663920
Fl_addmul_pre 7656534871
subii 7665450809
shift_left 7757330893
uutoi 8809152440
icopy 9058421940
maxss 9730390996
utoi 11897793063
addii 12406771377
evalexpo 13269713825
utoipos 14142270174
gc_const 15517206860
cgetipos 16305044231
cgetg 24664476378
cgeti 27136471693
new_chunk 93454419632
evallg 95502849207
set_avma 129312108098

Generated by: LCOV version 1.16