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 30551-f8501633d1) Lines: 605 680 89.0 %
Date: 2025-11-20 09:22:21 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 43869
sdivsi 102151
stack_calloc 110566
gc_stoi 155884
dvdui 167195
subis 170995
mod16 241356
Fl_ellj_pre 242636
truedivis 266843
mindd 270159
cmpri 282310
Mod32 311108
uutoineg 355728
Mod16 389733
cgetg_block 408356
gc_utoi 468609
dvdiu 576572
mpdiv 667727
cmpsr 796105
rdivss 839647
real2n 1067409
addri 1109295
gc_utoipos 1153860
real_0 1156757
equalis 1181659
equalsi 1181841
mpround 1216560
absrnz_equal2n 1292467
umodui 1296416
cmpss 1427033
Mod8 2073886
mpcmp 2227484
udivuu_rem 2416419
Mod2 2479259
gc_int 2574295
mulru 2765892
subir 3006722
equalui 3018575
equaliu 3018576
itou_or_0 3041670
maxdd 3182436
cmpis 3634895
negr 3670970
ceildivuu 3848753
cmpsi 3866893
Fl_center 4486426
absrnz_equal1 4519464
real_1_bit 4706339
maxuu 4815190
mod4 4932495
umuluu_or_0 5520622
umuluu_le 5803291
subsi 6117412
subri 6130738
truedivsi 6202031
affsi 6383309
mulrs 7181596
fractor 7376743
gc_NULL 7969254
cmpir 9427016
ugcdiu 10077520
cmpiu 10119593
cmpui 10119627
affectsign_safe 10738076
uabsdiviu_rem 11892741
addrs 12304662
smodss 12500508
rdivii 13101135
rdiviiz 13146773
mod8 13270607
mpabs_shallow 13428463
utor 13463407
affur 13463525
divii 14060906
subrs 16476478
dvdii 16547432
Fl_halve 18031287
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22307748
hammingu 24048606
abscmpui 32388060
abscmpiu 32388183
mulri 38033981
mpexpo 38859159
absequaliu 39660151
absequalui 41409091
itos_or_0 43597306
Mod4 43775512
modsi 45225523
affui 45473824
Fl_div 46547649
stack_malloc 46643734
truedivii 46802580
umodi2n 49027796
sdivsi_rem 51429849
gc_bool 51992909
gc_ulong 52175907
affrr_fixlg 54649834
stack_malloc_align 55491678
absi_shallow 57445140
Fl_addmulmul_pre 60014200
mod2 61153817
minuu 69107933
remlll_pre 75519659
evalprecp 78666071
evalvalp 81623170
mpsqr 90980424
Fl_sqr 94906215
Fl_triple 95315698
addiu 95456516
addui 99106287
mod2BIL 103591335
fixlg 104147731
mpodd 115086465
icopyspec 117030084
togglesign_safe 125522394
real_1 129806128
subiu 131685146
subui 136670174
mpshift 153182426
dvmduBIL 165659274
itou 177093114
shiftr 177980652
addis 181599071
gc_double 184441444
vali 190347000
varncmp 217212897
gc_long 242070653
mpsub 251529533
utoineg 294172820
cgetineg 295030373
rtor 295274889
addsi 306785175
muliu 373495045
itos 462056555
mulis 463137183
shiftr_inplace 463787002
Fl_double 469349865
real_0_bit 478892394
addir 479887244
affsr 486032629
stor 486335202
mpadd 574164405
negi 636707499
itor 713224214
Fl_neg 716595672
umodsu 724190794
stoi 772625833
expu 775309043
lg2prec 797889830
mpmul 837290481
rcopy 902762484
affii 909286118
mpneg 916660956
subrr 1000158270
cgetg_copy 1479802819
cmpuu 1492671228
cgetr 1838539969
togglesign 1911024866
minss 2008552474
absi 2060480966
mpabs 2131276010
Fl_sqr_pre 2155787807
setabssign 2197954321
nbits2lg 2362957981
Fl_mul 2414685407
expi 2453298649
addrr 2875473007
remii 3012195592
adduu 3411185064
stackdummy 3640624027
Fl_mul_pre 4085625144
Fl_add 4380917085
leafcopy 4964878174
shift_right 5625705782
dvmdsBIL 7013518273
Fl_sub 7279708023
subii 7664121043
Fl_addmul_pre 7676950131
shift_left 7682811183
uutoi 8808760873
icopy 9054610843
maxss 9718267251
utoi 11900054679
addii 12406551464
evalexpo 13124004522
utoipos 14144057242
gc_const 15513310355
cgetipos 16303048139
cgetg 24526684235
cgeti 27123361008
new_chunk 93229229446
evallg 95197950343
set_avma 128960804777

Generated by: LCOV version 1.16