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 30775-9d8a55740a) Lines: 607 680 89.3 %
Date: 2026-04-06 09:26:18 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
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 3313
stack_calloc_align 3325
varnmin 10374
uabsdivui_rem 16693
absr 19040
addss 25067
subss 25067
subuu 25067
dvdis 33737
cmprs 40996
cgetr_block 44271
sdivsi 102150
stack_calloc 110669
gc_stoi 155906
dvdui 167195
subis 171739
Fl_ellj_pre 238060
mindd 264381
truedivis 268379
cmpri 284263
mod16 307021
Mod32 311108
uutoineg 362603
Mod16 389733
cgetg_block 426431
gc_utoi 468778
dvdiu 576271
mpdiv 665533
umodui 711392
cmpsr 796104
rdivss 839647
real2n 1068594
addri 1106227
equalis 1151225
equalsi 1151407
gc_utoipos 1153579
real_0 1157679
mpround 1216588
absrnz_equal2n 1300272
cmpss 1392943
Mod8 2073635
mpcmp 2226339
Mod2 2370059
udivuu_rem 2418379
gc_int 2742549
mulru 2765892
subir 3004956
equaliu 3021716
equalui 3021716
itou_or_0 3147014
maxdd 3211409
cmpis 3634537
negr 3682609
cmpsi 3866537
ceildivuu 3905522
Fl_center 4486118
absrnz_equal1 4553932
real_1_bit 4713864
mod4 5140625
subri 6101962
subsi 6184342
truedivsi 6202024
umuluu_or_0 6285824
affsi 6445996
maxuu 6610954
mulrs 7181596
fractor 7379015
umuluu_le 7617880
gc_NULL 7961554
cmpir 9443865
ugcdiu 10320420
affectsign_safe 10730614
uabsdiviu_rem 11892741
addrs 12361320
smodss 12539216
cmpiu 12980986
cmpui 12981134
rdivii 13103719
rdiviiz 13147382
mpabs_shallow 13428463
divii 14049431
utor 14334997
affur 14335119
mod8 15584079
subrs 16536496
dvdii 16904639
Fl_halve 18765336
modis 19638526
int_bit 20969536
smodis 21176088
hammingu 24048700
evalvalser 24359582
abscmpiu 32439712
abscmpui 32439791
mulri 38284401
mpexpo 38879034
absequaliu 39546090
absequalui 41296004
Mod4 43850189
itos_or_0 44910711
modsi 45242155
affui 45491533
Fl_div 46696461
stack_malloc 46928375
umodi2n 48992690
sdivsi_rem 51446476
gc_ulong 52086500
truedivii 54708761
stack_malloc_align 55537489
affrr_fixlg 56106528
absi_shallow 56493000
gc_bool 56781235
mod2 62588422
Fl_addmulmul_pre 64622656
minuu 69668300
remlll_pre 75667114
evalprecp 78673582
evalvalp 81629979
Fl_triple 87168950
mpsqr 91037441
addiu 96942053
Fl_sqr 99472782
addui 101017045
fixlg 105717102
mod2BIL 107443316
mpodd 116092629
icopyspec 117797798
subiu 133396128
real_1 133640332
subui 138372046
mpshift 153492779
togglesign_safe 157226017
dvmduBIL 163147358
itou 179080847
gc_double 184147557
shiftr 187937997
vali 190835225
addis 194715115
varncmp 198759724
gc_long 242618427
mpsub 251617501
utoineg 297804535
cgetineg 298665167
rtor 303749775
addsi 319898894
muliu 373411174
Fl_double 442051058
shiftr_inplace 466804921
mulis 467108895
itos 476267655
real_0_bit 482209682
addir 483048884
affsr 501317003
stor 501664330
mpadd 572876549
negi 640855502
itor 716839825
Fl_neg 728914037
umodsu 734181271
expu 796841805
stoi 799029557
lg2prec 815902128
mpmul 837101545
rcopy 916768978
mpneg 926492470
affii 964203289
subrr 1006339389
cgetg_copy 1490084538
cmpuu 1490230980
cgetr 1875870856
togglesign 1953160037
minss 2026001350
absi 2066854852
mpabs 2137781015
setabssign 2204826158
Fl_sqr_pre 2336974733
nbits2lg 2402581674
expi 2424179792
Fl_mul 2437326920
addrr 2931077193
remii 3061959502
adduu 3446919196
stackdummy 3679005697
Fl_mul_pre 4218485011
leafcopy 5060652237
shift_right 5729237166
Fl_add 6147742201
dvmdsBIL 7147852005
Fl_sub 7383376433
Fl_addmul_pre 7655974032
subii 7719803948
shift_left 7795980406
uutoi 8931574466
icopy 9152158022
maxss 9692877541
utoi 12042681289
addii 12532456268
evalexpo 13396855970
utoipos 14254896896
gc_const 15648972768
cgetipos 16437998341
cgetg 25512836155
cgeti 27473404483
new_chunk 95101492780
evallg 96832158118
set_avma 131316068143

Generated by: LCOV version 1.16