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 30499-74bdd0ac5b) Lines: 605 680 89.0 %
Date: 2025-09-17 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 33912
cmprs 40996
cgetr_block 43659
sdivsi 102151
stack_calloc 110596
gc_stoi 155888
dvdui 167195
subis 170995
mod16 241355
Fl_ellj_pre 242610
truedivis 266807
mindd 270159
cmpri 282310
Mod32 311108
uutoineg 355278
Mod16 389733
cgetg_block 393679
gc_utoi 468567
dvdiu 576565
mpdiv 667720
cmpsr 795897
rdivss 839647
real2n 1067529
addri 1109382
gc_utoipos 1153846
real_0 1155977
equalis 1181693
equalsi 1181875
mpround 1216551
absrnz_equal2n 1291393
umodui 1296416
cmpss 1427033
Mod8 2075129
mpcmp 2227487
udivuu_rem 2416391
Mod2 2479841
gc_int 2574257
mulru 2765822
subir 3006696
equalui 3018600
equaliu 3018602
itou_or_0 3041667
maxdd 3176593
cmpis 3633617
negr 3669984
ceildivuu 3847771
cmpsi 3865588
Fl_center 4485592
absrnz_equal1 4517947
mod4 4700738
real_1_bit 4705930
maxuu 4805215
umuluu_or_0 5528428
umuluu_le 5803242
subsi 6117370
subri 6124270
truedivsi 6202031
affsi 6383347
mulrs 7181596
fractor 7376379
gc_NULL 7969254
cmpir 9424754
ugcdiu 10081969
cmpiu 10119203
cmpui 10119205
affectsign_safe 10737448
uabsdiviu_rem 11892741
addrs 12303038
smodss 12470352
rdivii 13100397
rdiviiz 13144130
mod8 13271842
mpabs_shallow 13428463
utor 13462486
affur 13462596
divii 14059321
subrs 16474819
dvdii 16542732
Fl_halve 18037645
modis 19638518
smodis 21176255
evalvalser 21443044
int_bit 22273522
hammingu 24045818
abscmpui 33398303
abscmpiu 33398330
mulri 38034218
mpexpo 38855824
absequaliu 39662965
absequalui 41411865
itos_or_0 43596663
Mod4 44366540
modsi 45225544
affui 45473825
Fl_div 46440966
stack_malloc 46640956
truedivii 46809123
umodi2n 49622544
sdivsi_rem 51429873
gc_bool 51982220
gc_ulong 52167253
stack_malloc_align 55488338
affrr_fixlg 55831566
absi_shallow 58455307
Fl_addmulmul_pre 60088465
mod2 61152826
minuu 69058007
remlll_pre 75489647
evalprecp 78666699
evalvalp 81623258
mpsqr 90970916
Fl_sqr 94873287
Fl_triple 95681734
addiu 97245031
addui 100894358
mod2BIL 103354004
fixlg 105328532
mpodd 115083616
icopyspec 117026330
togglesign_safe 125522590
real_1 131268802
subiu 131670172
subui 136363625
mpshift 153226223
dvmduBIL 165671450
itou 177097111
shiftr 181104791
addis 181808831
gc_double 184413767
vali 190336479
varncmp 217203520
gc_long 241811823
mpsub 251502838
utoineg 294171942
cgetineg 295029502
rtor 300587684
addsi 306993153
muliu 373474483
itos 461726503
mulis 463134681
Fl_double 474480159
real_0_bit 478609160
shiftr_inplace 478690884
addir 479858087
affsr 495500337
stor 495863492
mpadd 573922681
negi 637382962
itor 713189011
Fl_neg 716293098
umodsu 724178128
stoi 772829919
expu 787327586
lg2prec 807456574
mpmul 836990643
rcopy 906044177
affii 909121468
mpneg 917806876
subrr 1001233011
cgetg_copy 1479752716
cmpuu 1492984132
cgetr 1857294186
togglesign 1914451966
minss 2009116621
absi 2060504294
mpabs 2131736752
Fl_sqr_pre 2165310179
setabssign 2198432208
nbits2lg 2381187388
Fl_mul 2415083564
expi 2453817879
addrr 2881698756
remii 3012356414
adduu 3412082827
stackdummy 3645945558
Fl_mul_pre 4090110122
Fl_add 4357915347
leafcopy 4969707636
shift_right 5674040526
dvmdsBIL 7092126971
Fl_sub 7315022296
Fl_addmul_pre 7659117636
subii 7665258594
shift_left 7756506515
uutoi 8808059452
icopy 9057582091
maxss 9748475749
utoi 11900169580
addii 12406905668
evalexpo 13264773215
utoipos 14147848769
gc_const 15517348910
cgetipos 16310933765
cgetg 24672426142
cgeti 27131660709
new_chunk 93456119853
evallg 95490464604
set_avma 129309662334

Generated by: LCOV version 1.16