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 30540-a74e376001) Lines: 605 680 89.0 %
Date: 2025-11-09 09:22:50 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 43644
sdivsi 102149
stack_calloc 110586
gc_stoi 155881
dvdui 167195
subis 170994
mod16 241352
Fl_ellj_pre 242626
truedivis 266822
mindd 270161
cmpri 282310
Mod32 311108
uutoineg 355595
Mod16 389733
cgetg_block 408207
gc_utoi 468631
dvdiu 576572
mpdiv 667721
cmpsr 795890
rdivss 839647
real2n 1067408
addri 1109300
gc_utoipos 1153849
real_0 1156110
equalis 1181585
equalsi 1181810
mpround 1216546
absrnz_equal2n 1291363
umodui 1296416
cmpss 1427033
Mod8 2073879
mpcmp 2227493
udivuu_rem 2416391
Mod2 2479266
gc_int 2574291
mulru 2765822
subir 3006704
equaliu 3018661
equalui 3018662
itou_or_0 3041672
maxdd 3176359
cmpis 3633614
negr 3668562
ceildivuu 3846039
cmpsi 3865593
Fl_center 4485470
absrnz_equal1 4518127
real_1_bit 4706086
maxuu 4804736
mod4 4932727
umuluu_or_0 5508964
umuluu_le 5803235
subri 6081955
subsi 6117454
truedivsi 6202031
affsi 6383327
mulrs 7181596
fractor 7376005
gc_NULL 7969894
cmpir 9440330
ugcdiu 10082518
cmpiu 10119747
cmpui 10119779
affectsign_safe 10737278
uabsdiviu_rem 11892741
addrs 12303337
smodss 12520339
rdivii 13099896
rdiviiz 13144765
mod8 13272107
mpabs_shallow 13428463
utor 13462358
affur 13462467
divii 14051409
subrs 16475165
dvdii 16552415
Fl_halve 18046817
modis 19638526
smodis 21176263
evalvalser 21443044
int_bit 22271939
hammingu 24045860
abscmpiu 33116315
abscmpui 33116382
mulri 38032984
mpexpo 38849924
absequaliu 39660869
absequalui 41409750
itos_or_0 43595257
Mod4 43769827
modsi 45225490
affui 45473824
Fl_div 46534109
stack_malloc 46641031
truedivii 46776680
umodi2n 49022194
sdivsi_rem 51429818
gc_bool 51992501
gc_ulong 52183005
affrr_fixlg 54637968
stack_malloc_align 55483393
absi_shallow 58169977
Fl_addmulmul_pre 60145222
mod2 61155317
minuu 69139171
remlll_pre 75609970
evalprecp 78669094
evalvalp 81626201
mpsqr 90967692
Fl_sqr 94910995
Fl_triple 95525110
addiu 96916003
addui 100565786
mod2BIL 103595646
fixlg 104135712
mpodd 115088025
icopyspec 117026534
togglesign_safe 125517439
real_1 129741139
subiu 131675466
subui 136660417
mpshift 153189058
dvmduBIL 165740554
itou 177094192
shiftr 177917384
addis 181585571
gc_double 184356830
vali 190342084
varncmp 217203865
gc_long 242065833
mpsub 251438393
utoineg 294161629
cgetineg 295018715
rtor 295213866
addsi 306769407
muliu 373414634
itos 461982038
mulis 463154849
shiftr_inplace 463911519
Fl_double 470171374
addir 479823900
real_0_bit 480829422
affsr 485965202
stor 486262017
mpadd 575763936
negi 636722449
itor 713065020
Fl_neg 716621866
umodsu 724175032
stoi 772687893
expu 775168028
lg2prec 797830521
mpmul 838815970
rcopy 902622223
affii 909108716
mpneg 916646001
subrr 1000084627
cgetg_copy 1479746581
cmpuu 1492833920
cgetr 1838141890
togglesign 1910897480
minss 2008792866
absi 2060424088
mpabs 2131217894
Fl_sqr_pre 2156822236
setabssign 2197902723
nbits2lg 2363754237
Fl_mul 2415911239
expi 2453221124
addrr 2877012540
remii 3013310000
adduu 3412629359
stackdummy 3644833317
Fl_mul_pre 4086926978
Fl_add 4383055244
leafcopy 4964600235
shift_right 5625898725
dvmdsBIL 7013993209
Fl_sub 7298269342
Fl_addmul_pre 7658170216
subii 7664607220
shift_left 7682489938
uutoi 8810800935
icopy 9056268723
maxss 9734902967
utoi 11903554814
addii 12407164465
evalexpo 13126317154
utoipos 14146939775
gc_const 15514548375
cgetipos 16305244325
cgetg 24539242944
cgeti 27130014293
new_chunk 93249238533
evallg 95224164713
set_avma 128989317697

Generated by: LCOV version 1.16