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 30536-6f6fcf9613) Lines: 605 680 89.0 %
Date: 2025-11-06 09:21:54 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 43658
sdivsi 102148
stack_calloc 110576
gc_stoi 155882
dvdui 167195
subis 170993
mod16 241356
Fl_ellj_pre 242634
truedivis 266806
mindd 270158
cmpri 282310
Mod32 311108
uutoineg 355241
Mod16 389733
cgetg_block 393700
gc_utoi 468634
dvdiu 576564
mpdiv 667695
cmpsr 795892
rdivss 839647
real2n 1067402
addri 1109249
gc_utoipos 1153843
real_0 1156077
equalis 1181520
equalsi 1181702
mpround 1216560
absrnz_equal2n 1291315
umodui 1296416
cmpss 1427033
Mod8 2075129
mpcmp 2227479
udivuu_rem 2416391
Mod2 2479841
gc_int 2574300
mulru 2765822
subir 3006698
equalui 3018653
equaliu 3018654
itou_or_0 3041659
maxdd 3176390
cmpis 3633593
negr 3668472
ceildivuu 3847260
cmpsi 3865566
Fl_center 4485580
absrnz_equal1 4518086
mod4 4700746
real_1_bit 4706079
maxuu 4804841
umuluu_or_0 5509267
umuluu_le 5803235
subsi 6117360
subri 6124349
truedivsi 6202031
affsi 6383415
mulrs 7181596
fractor 7376004
gc_NULL 7969407
cmpir 9425126
ugcdiu 10081551
cmpiu 10119530
cmpui 10119585
affectsign_safe 10737435
uabsdiviu_rem 11892741
addrs 12303183
smodss 12516666
rdivii 13096826
rdiviiz 13141454
mod8 13271508
mpabs_shallow 13428463
utor 13462356
affur 13462455
divii 14057214
subrs 16475083
dvdii 16537931
Fl_halve 18017815
modis 19638526
smodis 21176263
evalvalser 21443044
int_bit 22276171
hammingu 24045747
abscmpiu 33114627
abscmpui 33114834
mulri 38032965
mpexpo 38854256
absequaliu 39663182
absequalui 41412077
itos_or_0 43594790
Mod4 43783073
modsi 45225524
affui 45473824
Fl_div 46526421
stack_malloc 46641274
truedivii 46809010
umodi2n 49038540
sdivsi_rem 51429851
gc_bool 51982349
gc_ulong 52160889
affrr_fixlg 54636908
stack_malloc_align 55486871
absi_shallow 58171104
Fl_addmulmul_pre 60104649
mod2 61152550
minuu 69082565
remlll_pre 75451963
evalprecp 78668326
evalvalp 81625611
mpsqr 90968743
Fl_sqr 94865264
Fl_triple 95667857
addiu 96667811
addui 100317545
mod2BIL 103361720
fixlg 104134512
mpodd 115081062
icopyspec 117026733
togglesign_safe 125528027
real_1 129766492
subiu 131676169
subui 136369584
mpshift 153197703
dvmduBIL 165715075
itou 177091902
shiftr 177923611
addis 181526417
gc_double 184365520
vali 190339588
varncmp 217203499
gc_long 241812245
mpsub 251494866
utoineg 294155102
cgetineg 295012405
rtor 295209881
addsi 306704705
muliu 373421079
itos 461716211
mulis 463159704
shiftr_inplace 463708673
Fl_double 474450194
real_0_bit 478750402
addir 479838911
affsr 485955440
stor 486258541
mpadd 574008800
negi 636677290
itor 713108662
Fl_neg 716530337
umodsu 724174179
stoi 772614823
expu 775145048
lg2prec 797856950
mpmul 837115314
rcopy 902618353
affii 909028449
mpneg 916598643
subrr 1000067594
cgetg_copy 1479697180
cmpuu 1492989203
cgetr 1838094307
togglesign 1910898492
minss 2008245687
absi 2060338148
mpabs 2131097507
Fl_sqr_pre 2161022781
setabssign 2197772057
nbits2lg 2361452285
Fl_mul 2414639034
expi 2452816859
addrr 2875363607
remii 3012014781
adduu 3411858426
stackdummy 3643470501
Fl_mul_pre 4083212992
Fl_add 4357197111
leafcopy 4964198343
shift_right 5623937333
dvmdsBIL 7012139967
Fl_sub 7297071012
Fl_addmul_pre 7651633262
subii 7663990972
shift_left 7680878557
uutoi 8807800807
icopy 9055943586
maxss 9728670783
utoi 11896344982
addii 12405796475
evalexpo 13125294003
utoipos 14140549763
gc_const 15513033607
cgetipos 16301341444
cgetg 24530997558
cgeti 27129298563
new_chunk 93235203221
evallg 95224040180
set_avma 128982313023

Generated by: LCOV version 1.16