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 30582-6e9af8ee1d) Lines: 605 680 89.0 %
Date: 2025-12-20 09:23:49 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 43815
sdivsi 102150
stack_calloc 110594
gc_stoi 155881
dvdui 167195
subis 170967
mod16 241365
Fl_ellj_pre 246615
truedivis 266982
mindd 269923
cmpri 282310
Mod32 311108
uutoineg 358339
Mod16 389733
cgetg_block 409137
gc_utoi 468546
dvdiu 576616
mpdiv 667475
cmpsr 796090
rdivss 839647
real2n 1067403
addri 1108557
gc_utoipos 1154032
real_0 1156795
equalis 1181969
equalsi 1182151
mpround 1216592
absrnz_equal2n 1292754
umodui 1296458
cmpss 1446078
Mod8 2073798
mpcmp 2227555
udivuu_rem 2416419
Mod2 2479214
gc_int 2574629
mulru 2765892
subir 3006514
equalui 3018581
equaliu 3018582
itou_or_0 3041674
maxdd 3184829
cmpis 3634939
negr 3671115
cmpsi 3866938
ceildivuu 3918804
Fl_center 4486763
absrnz_equal1 4520734
real_1_bit 4706279
maxuu 4815330
mod4 4932972
umuluu_or_0 5521562
umuluu_le 5803291
subri 6131782
subsi 6149775
truedivsi 6202031
affsi 6395042
mulrs 7181596
fractor 7376759
gc_NULL 7976391
cmpir 9432616
ugcdiu 10106031
cmpiu 10120548
cmpui 10120601
affectsign_safe 10743874
uabsdiviu_rem 11892741
addrs 12306785
smodss 12520649
rdivii 13102547
rdiviiz 13147561
mod8 13322198
mpabs_shallow 13428463
utor 13463180
affur 13463296
divii 14064832
subrs 16478575
dvdii 16570729
Fl_halve 18771536
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22259774
hammingu 24048823
abscmpiu 32470551
abscmpui 32470593
mulri 38033612
mpexpo 38886477
absequaliu 39660637
absequalui 41409574
itos_or_0 43598320
Mod4 43779964
modsi 45225507
affui 45473825
Fl_div 46545980
stack_malloc 46647007
truedivii 47038024
umodi2n 49032149
sdivsi_rem 51429833
gc_bool 52017640
gc_ulong 52417306
affrr_fixlg 54656887
stack_malloc_align 55512410
absi_shallow 57534178
mod2 61167147
Fl_addmulmul_pre 63690748
minuu 69191766
remlll_pre 75703544
evalprecp 78667106
evalvalp 81623604
mpsqr 91046690
addiu 95621388
Fl_sqr 96087726
Fl_triple 97425202
addui 99271575
mod2BIL 103692688
fixlg 104206901
mpodd 115091431
icopyspec 117099333
togglesign_safe 125663418
real_1 129835609
subiu 131692841
subui 136687237
mpshift 153185969
dvmduBIL 163231660
itou 177606251
shiftr 178007358
addis 181597979
gc_double 184317786
vali 190501961
varncmp 217216511
gc_long 242321248
mpsub 251653817
utoineg 294969764
rtor 295289790
cgetineg 295829100
addsi 306782633
muliu 373629283
itos 462451047
shiftr_inplace 464096127
mulis 464523793
Fl_double 477041843
real_0_bit 479275527
addir 480567371
affsr 486167082
stor 486455971
mpadd 574587820
negi 636842477
itor 713646473
Fl_neg 719390308
umodsu 724399014
stoi 772665602
expu 775580276
lg2prec 798383729
mpmul 837870265
rcopy 903243402
affii 910292413
mpneg 916798886
subrr 1000346366
cgetg_copy 1480497651
cmpuu 1492691485
cgetr 1839212314
togglesign 1913039055
minss 2009019580
absi 2067673226
mpabs 2138469443
Fl_sqr_pre 2182253160
setabssign 2205156206
nbits2lg 2365164503
Fl_mul 2418458624
expi 2457396602
addrr 2876912874
remii 3014866380
adduu 3415060931
stackdummy 3647346497
Fl_mul_pre 4113590855
Fl_add 4402569761
leafcopy 4973463195
shift_right 5628687501
dvmdsBIL 7018050087
Fl_sub 7304870504
subii 7667641974
Fl_addmul_pre 7684662414
shift_left 7686618245
uutoi 8819122009
icopy 9060438359
maxss 9734122803
utoi 11913523158
addii 12418572843
evalexpo 13130195588
utoipos 14164051188
gc_const 15525645668
cgetipos 16326129715
cgetg 24552527538
cgeti 27160343919
new_chunk 93324726637
evallg 95293256976
set_avma 129089272108

Generated by: LCOV version 1.16