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 30503-50341449e1) Lines: 605 680 89.0 %
Date: 2025-09-28 09:23:49 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 43631
sdivsi 102151
stack_calloc 110612
gc_stoi 155884
dvdui 167195
subis 170995
mod16 241356
Fl_ellj_pre 242626
truedivis 266822
mindd 270164
cmpri 282310
Mod32 311108
uutoineg 355231
Mod16 389733
cgetg_block 393707
gc_utoi 468570
dvdiu 576571
mpdiv 667722
cmpsr 795890
rdivss 839647
real2n 1067511
addri 1109278
gc_utoipos 1153848
real_0 1156050
equalis 1181688
equalsi 1181870
mpround 1216545
absrnz_equal2n 1291391
umodui 1296416
cmpss 1427033
Mod8 2075129
mpcmp 2227513
udivuu_rem 2416391
Mod2 2479841
gc_int 2574279
mulru 2765822
subir 3006697
equaliu 3018670
equalui 3018671
itou_or_0 3041668
maxdd 3176350
cmpis 3633646
negr 3670057
ceildivuu 3846974
cmpsi 3865618
Fl_center 4485591
absrnz_equal1 4517959
mod4 4700746
real_1_bit 4705734
maxuu 4805063
umuluu_or_0 5531857
umuluu_le 5803249
subri 6094686
subsi 6117103
truedivsi 6202031
affsi 6383205
mulrs 7181596
fractor 7376380
gc_NULL 7968268
cmpir 9442340
ugcdiu 10082820
cmpiu 10124554
cmpui 10124566
affectsign_safe 10737509
uabsdiviu_rem 11892741
addrs 12303250
smodss 12441234
rdivii 13102039
rdiviiz 13145645
mod8 13271588
mpabs_shallow 13428463
utor 13462410
affur 13462519
divii 14051433
subrs 16475037
dvdii 16541161
Fl_halve 18029191
modis 19638526
smodis 21176263
evalvalser 21443044
int_bit 22262471
hammingu 24045808
abscmpui 32378304
abscmpiu 32378317
mulri 38034204
mpexpo 38855290
absequaliu 39663122
absequalui 41412024
itos_or_0 43596629
Mod4 44366225
modsi 45225519
affui 45473824
Fl_div 46472233
stack_malloc 46641501
truedivii 46775999
umodi2n 49622174
sdivsi_rem 51429846
gc_bool 51978814
gc_ulong 52160670
stack_malloc_align 55489876
affrr_fixlg 55832411
absi_shallow 57436117
Fl_addmulmul_pre 60062978
mod2 61153848
minuu 69039971
remlll_pre 75506116
evalprecp 78668234
evalvalp 81624863
mpsqr 90983149
Fl_sqr 94866779
addiu 95204512
Fl_triple 95506762
addui 98854303
mod2BIL 103359262
fixlg 105329499
mpodd 115084336
icopyspec 117026491
togglesign_safe 125500538
real_1 131246771
subiu 131672441
subui 136366100
mpshift 153212230
dvmduBIL 165695131
itou 177097753
shiftr 181100043
addis 181769520
gc_double 184389605
vali 190338972
varncmp 217203564
gc_long 241812996
mpsub 251529192
utoineg 294168571
cgetineg 295026189
rtor 300581937
addsi 306948601
muliu 373447433
itos 461680026
mulis 463131010
Fl_double 474094907
shiftr_inplace 478762331
addir 479840914
real_0_bit 480844387
affsr 495477858
stor 495839658
mpadd 575926396
negi 637510064
itor 713107383
Fl_neg 716255626
umodsu 724190710
stoi 772768100
expu 787310762
lg2prec 807397166
mpmul 839026987
rcopy 906011697
affii 909080420
mpneg 917916827
subrr 1001238206
cgetg_copy 1479742823
cmpuu 1493011018
cgetr 1857158015
togglesign 1914524763
minss 2008952350
absi 2060499542
mpabs 2131763777
Fl_sqr_pre 2163572615
setabssign 2198464846
nbits2lg 2382857382
Fl_mul 2412882688
expi 2453797588
addrr 2883715433
remii 3011653019
adduu 3409811749
stackdummy 3639712715
Fl_mul_pre 4086472178
Fl_add 4356714216
leafcopy 4969798855
shift_right 5674130310
dvmdsBIL 7092092747
Fl_sub 7292584467
Fl_addmul_pre 7652814692
subii 7664434538
shift_left 7756631802
uutoi 8805117990
icopy 9057200071
maxss 9726270162
utoi 11895601452
addii 12407012605
evalexpo 13266827818
utoipos 14143114768
gc_const 15517659910
cgetipos 16306107842
cgetg 24663752528
cgeti 27128022934
new_chunk 93444942913
evallg 95465237184
set_avma 129294936269

Generated by: LCOV version 1.16