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 30600-bbb75e9497) Lines: 605 680 89.0 %
Date: 2026-01-05 09:22:13 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 43779
sdivsi 102150
stack_calloc 110359
gc_stoi 155884
dvdui 167195
subis 170919
Fl_ellj_pre 238049
mod16 241110
mindd 264335
truedivis 266954
cmpri 282310
Mod32 311108
uutoineg 362725
Mod16 389733
cgetg_block 407176
gc_utoi 468623
dvdiu 576271
mpdiv 665643
cmpsr 796107
rdivss 839647
real2n 1067009
addri 1105766
gc_utoipos 1153497
real_0 1156390
equalis 1185525
equalsi 1185706
mpround 1216579
absrnz_equal2n 1292609
umodui 1296276
cmpss 1379853
Mod8 2074039
mpcmp 2225876
Mod2 2370206
udivuu_rem 2416412
gc_int 2631176
mulru 2765892
subir 3005091
equalui 3018211
equaliu 3018212
itou_or_0 3041722
maxdd 3178388
cmpis 3634837
negr 3671286
cmpsi 3866840
ceildivuu 3902701
Fl_center 4486178
absrnz_equal1 4519841
real_1_bit 4704734
maxuu 4814966
mod4 5084262
umuluu_or_0 5524650
umuluu_le 5803291
subsi 6093411
subri 6115909
truedivsi 6202031
affsi 6373024
mulrs 7181596
fractor 7376761
gc_NULL 7962365
cmpir 9432765
ugcdiu 10114122
cmpui 10131933
cmpiu 10131934
affectsign_safe 10726478
uabsdiviu_rem 11892741
addrs 12304787
smodss 12467886
rdivii 13102891
rdiviiz 13146786
mod8 13162585
mpabs_shallow 13428463
utor 13461767
affur 13461873
divii 14044601
subrs 16475327
dvdii 16560624
Fl_halve 18787684
modis 19638526
int_bit 20946915
smodis 21176060
evalvalser 21527935
hammingu 24048497
abscmpiu 32376297
abscmpui 32376482
mulri 38033708
mpexpo 38871973
absequaliu 39661182
absequalui 41410101
itos_or_0 43599344
Mod4 43777435
modsi 45225516
affui 45473822
Fl_div 46586209
stack_malloc 46627094
truedivii 47023881
umodi2n 48920951
sdivsi_rem 51429843
gc_bool 51980567
gc_ulong 52075390
affrr_fixlg 54653008
stack_malloc_align 55496694
absi_shallow 57426132
mod2 61114382
Fl_addmulmul_pre 64593675
minuu 69254313
remlll_pre 75706399
evalprecp 78665485
evalvalp 81622060
mpsqr 91013473
Fl_triple 94413707
addiu 95425208
Fl_sqr 95863921
addui 99069137
mod2BIL 103306003
fixlg 104196529
mpodd 115078233
icopyspec 117424885
togglesign_safe 125525000
real_1 129802734
subiu 131841467
subui 136814476
mpshift 153162667
dvmduBIL 165853028
shiftr 177970796
itou 178232555
addis 181555284
gc_double 184171434
vali 190377505
varncmp 217202873
gc_long 242313172
mpsub 251487167
utoineg 293940772
cgetineg 294802300
rtor 295243005
addsi 306740443
muliu 374473546
itos 462137448
shiftr_inplace 464140347
mulis 466747436
Fl_double 468734768
real_0_bit 479154698
addir 481405530
affsr 486132230
stor 486449983
mpadd 574284393
negi 636855031
itor 714663649
Fl_neg 719348343
umodsu 723958070
stoi 772685403
expu 775376749
lg2prec 799667343
mpmul 837390345
rcopy 903185931
affii 910171207
mpneg 916774321
subrr 1000108848
cgetg_copy 1480098431
cmpuu 1492606541
cgetr 1840104072
togglesign 1912271035
minss 2009660030
absi 2068263044
mpabs 2139044784
Fl_sqr_pre 2172942657
setabssign 2205744143
nbits2lg 2365427042
Fl_mul 2418820321
expi 2448601331
addrr 2876924270
remii 3004864529
adduu 3409854454
stackdummy 3639248430
Fl_mul_pre 4086011936
Fl_add 4396697402
leafcopy 4973541530
shift_right 5631174478
dvmdsBIL 7009098766
Fl_sub 7259030719
subii 7654263707
Fl_addmul_pre 7670101577
shift_left 7675456250
uutoi 8811601146
icopy 9051758248
maxss 9694162660
utoi 11902082283
addii 12404133457
evalexpo 13130313602
utoipos 14149435338
gc_const 15508692845
cgetipos 16319399598
cgetg 24538814255
cgeti 27095559834
new_chunk 93216280620
evallg 95177436443
set_avma 128953923156

Generated by: LCOV version 1.16