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

Generated by: LCOV version 1.16