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 30563-682842a727) Lines: 605 680 89.0 %
Date: 2025-11-29 09:23:24 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 43856
sdivsi 102150
stack_calloc 110594
gc_stoi 155884
dvdui 167195
subis 170995
mod16 241355
Fl_ellj_pre 242643
truedivis 266832
mindd 270158
cmpri 282310
Mod32 311108
uutoineg 355682
Mod16 389733
cgetg_block 408342
gc_utoi 468589
dvdiu 576569
mpdiv 667723
cmpsr 796107
rdivss 839647
real2n 1067392
addri 1109276
gc_utoipos 1153835
real_0 1156768
equalis 1181498
equalsi 1181680
mpround 1216560
absrnz_equal2n 1292528
umodui 1296416
cmpss 1427033
Mod8 2073933
mpcmp 2227437
udivuu_rem 2416419
Mod2 2479292
gc_int 2574332
mulru 2765892
subir 3006693
equaliu 3018566
equalui 3018567
itou_or_0 3041668
maxdd 3182451
cmpis 3634914
negr 3671015
ceildivuu 3848213
cmpsi 3866912
Fl_center 4486496
absrnz_equal1 4519432
real_1_bit 4706170
maxuu 4815290
mod4 4933234
umuluu_or_0 5526715
umuluu_le 5803291
subsi 6117413
subri 6119273
truedivsi 6202031
affsi 6383220
mulrs 7181596
fractor 7376746
gc_NULL 7969557
cmpir 9427278
ugcdiu 10077605
cmpiu 10120418
cmpui 10120441
affectsign_safe 10736299
uabsdiviu_rem 11892741
addrs 12304621
smodss 12481386
rdivii 13100110
rdiviiz 13144407
mod8 13273137
mpabs_shallow 13428463
utor 13463331
affur 13463430
divii 14058694
subrs 16476302
dvdii 16558397
Fl_halve 18029134
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22324212
hammingu 24048591
abscmpui 33876575
abscmpiu 33876605
mulri 38033984
mpexpo 38856393
absequaliu 39661276
absequalui 41410207
itos_or_0 43597805
Mod4 43779519
modsi 45225566
affui 45473825
Fl_div 46473870
stack_malloc 46643902
truedivii 46804333
umodi2n 49031992
sdivsi_rem 51429893
gc_bool 52000879
gc_ulong 52173709
affrr_fixlg 54651867
stack_malloc_align 55490125
absi_shallow 58933235
Fl_addmulmul_pre 60087952
mod2 61154199
minuu 69105920
remlll_pre 75549995
evalprecp 78666030
evalvalp 81622504
mpsqr 90973547
Fl_sqr 94899035
Fl_triple 95195465
addiu 98437896
addui 102087677
mod2BIL 103592727
fixlg 104149673
mpodd 115086016
icopyspec 117029961
togglesign_safe 125521791
real_1 129797868
subiu 131686746
subui 136671692
mpshift 153185575
dvmduBIL 165594706
itou 177094144
shiftr 177979288
addis 181563692
gc_double 184442464
vali 190346984
varncmp 217212938
gc_long 242071701
mpsub 251490861
utoineg 294182603
cgetineg 295040059
rtor 295271354
addsi 306747458
muliu 373629669
itos 462057845
mulis 463145688
shiftr_inplace 463938560
Fl_double 469111681
real_0_bit 479053319
addir 479877981
affsr 486122203
stor 486414909
mpadd 574266034
negi 636746527
itor 713265587
Fl_neg 716225467
umodsu 724214586
stoi 772591957
expu 775356198
lg2prec 798015836
mpmul 837353488
rcopy 902741928
affii 909269765
mpneg 916686962
subrr 1000093914
cgetg_copy 1479802042
cmpuu 1492640491
cgetr 1838663706
togglesign 1911048092
minss 2008254499
absi 2060491717
mpabs 2131273924
Fl_sqr_pre 2154496916
setabssign 2197940388
nbits2lg 2363588548
Fl_mul 2415874918
expi 2453112568
addrr 2875811241
remii 3013031168
adduu 3413966937
stackdummy 3650915969
Fl_mul_pre 4076955318
Fl_add 4379493985
leafcopy 4964857052
shift_right 5625930350
dvmdsBIL 7014529616
Fl_sub 7306638565
subii 7665388572
Fl_addmul_pre 7665841092
shift_left 7682887654
uutoi 8810658483
icopy 9055951162
maxss 9747811093
utoi 11904426386
addii 12408235623
evalexpo 13124516688
utoipos 14148085678
gc_const 15514830620
cgetipos 16307218222
cgetg 24545223811
cgeti 27136701797
new_chunk 93262538033
evallg 95239606694
set_avma 129002692014

Generated by: LCOV version 1.16