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 30483-b6b1f87815) Lines: 605 680 89.0 %
Date: 2025-09-12 09:24:16 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 43589
sdivsi 102151
stack_calloc 110149
gc_stoi 155887
dvdui 167195
subis 170994
mod16 236595
Fl_ellj_pre 242618
truedivis 266820
mindd 270151
cmpri 282310
Mod32 311108
uutoineg 355543
Mod16 389733
cgetg_block 393641
gc_utoi 468532
dvdiu 576569
mpdiv 667715
cmpsr 795896
rdivss 839647
real2n 1067453
addri 1109351
gc_utoipos 1153918
real_0 1156018
equalis 1181633
equalsi 1181816
mpround 1216539
absrnz_equal2n 1288987
umodui 1296415
cmpss 1427033
Mod8 2070250
mpcmp 2227504
udivuu_rem 2416391
Mod2 2479841
gc_int 2574342
mulru 2765822
equaliu 2995638
equalui 2995640
subir 3006681
itou_or_0 3054261
maxdd 3163738
cmpis 3633687
negr 3670224
ceildivuu 3845698
cmpsi 3865657
Fl_center 4485590
absrnz_equal1 4515841
mod4 4700793
real_1_bit 4705820
maxuu 4805094
umuluu_or_0 5542027
umuluu_le 5800680
subsi 6112282
subri 6128677
truedivsi 6202031
affsi 6383184
mulrs 7181596
fractor 7376327
gc_NULL 7969061
cmpir 9427945
ugcdiu 10085795
cmpui 10116717
cmpiu 10116923
affectsign_safe 10736690
uabsdiviu_rem 11892741
addrs 12304971
smodss 12493885
rdivii 13102288
rdiviiz 13145340
mod8 13271584
mpabs_shallow 13428463
utor 13460215
affur 13460323
divii 14064412
dvdii 16463195
subrs 16476640
Fl_halve 18016363
modis 19638518
smodis 21176255
evalvalser 21443044
int_bit 22261960
hammingu 24045715
abscmpiu 33058628
abscmpui 33058639
mulri 38034405
mpexpo 38856478
absequaliu 39650167
absequalui 41399067
itos_or_0 43581865
Mod4 44349993
modsi 45225529
affui 45473825
Fl_div 46487708
stack_malloc 46631405
truedivii 46801702
umodi2n 49601135
sdivsi_rem 51429856
gc_bool 51901916
gc_ulong 52139008
stack_malloc_align 55489587
affrr_fixlg 55797476
absi_shallow 58110071
Fl_addmulmul_pre 60063862
mod2 61146731
minuu 69000950
remlll_pre 75467623
evalprecp 78665297
evalvalp 81622057
mpsqr 90974532
Fl_sqr 94843874
Fl_triple 95587255
addiu 96510000
addui 100159335
mod2BIL 103330383
fixlg 105292886
mpodd 115076588
icopyspec 117008941
togglesign_safe 125514280
real_1 131224177
subiu 131650440
subui 136343924
mpshift 153208795
dvmduBIL 165637375
itou 177063547
shiftr 180848314
addis 181732981
gc_double 184411363
vali 190292745
varncmp 217201219
gc_long 241795984
mpsub 251523897
utoineg 294207023
cgetineg 295064782
rtor 300464608
addsi 306917417
muliu 372548867
itos 461709746
mulis 463156939
Fl_double 474182362
real_0_bit 478397724
shiftr_inplace 478474963
addir 479726595
affsr 495357207
stor 495659466
mpadd 574224351
negi 637399047
itor 713026920
Fl_neg 716452433
umodsu 724155284
stoi 772660421
expu 787000392
lg2prec 807070041
mpmul 837294585
rcopy 905606871
affii 909414743
mpneg 917797694
subrr 1001030129
cgetg_copy 1479694877
cmpuu 1492921919
cgetr 1856870161
togglesign 1914495030
minss 2008943618
absi 2060464253
mpabs 2131705053
Fl_sqr_pre 2162434407
setabssign 2198380599
nbits2lg 2380740258
Fl_mul 2415425646
expi 2453983300
addrr 2881363066
remii 3011253186
adduu 3412272336
stackdummy 3644918972
Fl_mul_pre 4078433971
Fl_add 4357890394
leafcopy 4968983098
shift_right 5671898104
dvmdsBIL 7089448372
Fl_sub 7296449403
Fl_addmul_pre 7644808984
subii 7663758348
shift_left 7754179403
uutoi 8813228030
icopy 9055265179
maxss 9732781018
utoi 11905869258
addii 12406703395
evalexpo 13259954131
utoipos 14153623322
gc_const 15511766446
cgetipos 16320578613
cgetg 24661406661
cgeti 27135121168
new_chunk 93444949412
evallg 95466837853
set_avma 129285408856

Generated by: LCOV version 1.16