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 30748-2ce22a5f1f) Lines: 605 680 89.0 %
Date: 2026-03-18 09:25:54 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 3313
stack_calloc_align 3325
varnmin 10374
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33730
cmprs 40996
cgetr_block 44120
sdivsi 102150
stack_calloc 110679
gc_stoi 155904
dvdui 167195
subis 171739
Fl_ellj_pre 238048
mindd 264380
truedivis 268368
cmpri 284263
mod16 306998
Mod32 311108
uutoineg 362799
Mod16 389733
cgetg_block 426375
gc_utoi 468724
dvdiu 576276
mpdiv 665510
cmpsr 797302
rdivss 839647
real2n 1068601
addri 1106188
equalis 1151212
equalsi 1151394
gc_utoipos 1153559
real_0 1157688
mpround 1216580
umodui 1290953
absrnz_equal2n 1300343
cmpss 1392943
Mod8 2074001
mpcmp 2226345
Mod2 2370086
udivuu_rem 2418379
gc_int 2742565
mulru 2765892
subir 3004983
equaliu 3021724
equalui 3021724
itou_or_0 3147005
maxdd 3211651
cmpis 3634447
negr 3682691
cmpsi 3866448
ceildivuu 3903197
Fl_center 4486137
absrnz_equal1 4553079
real_1_bit 4714017
mod4 5140584
subri 6072516
subsi 6184615
truedivsi 6202031
umuluu_or_0 6241040
affsi 6446144
maxuu 6610875
mulrs 7181596
fractor 7379020
umuluu_le 7617880
gc_NULL 7961760
cmpir 9461862
ugcdiu 10320929
affectsign_safe 10730759
uabsdiviu_rem 11892741
addrs 12360580
smodss 12623398
cmpui 12983539
cmpiu 12983741
rdivii 13105933
rdiviiz 13148135
mpabs_shallow 13428463
divii 14056552
utor 14334799
affur 14334921
mod8 15585091
subrs 16536348
dvdii 16894010
Fl_halve 18810554
modis 19638526
int_bit 20954218
smodis 21176081
hammingu 24048701
evalvalser 24359582
abscmpiu 31412606
abscmpui 31412709
mulri 38284765
mpexpo 38875529
absequaliu 39539952
absequalui 41289962
Mod4 43838972
itos_or_0 44910855
modsi 45242137
affui 45491532
Fl_div 46845244
stack_malloc 46928559
umodi2n 48984151
sdivsi_rem 51446470
gc_ulong 52071411
truedivii 54713147
absi_shallow 55464689
stack_malloc_align 55536439
affrr_fixlg 56108791
gc_bool 56164721
mod2 61680800
Fl_addmulmul_pre 64625012
minuu 69661596
remlll_pre 76078250
evalprecp 78669704
evalvalp 81626265
Fl_triple 90935419
mpsqr 91047048
addiu 94884898
addui 98959781
Fl_sqr 99503908
fixlg 105719398
mod2BIL 106535975
mpodd 115185426
icopyspec 117797100
subiu 133392692
real_1 133622832
subui 138368305
mpshift 153561692
togglesign_safe 157314727
dvmduBIL 161308869
itou 179066876
gc_double 184170496
shiftr 187856215
vali 190833604
addis 194687175
varncmp 198758864
gc_long 242627742
mpsub 251627514
utoineg 297820367
cgetineg 298682243
rtor 303754259
addsi 319871895
muliu 376434170
Fl_double 451379001
mulis 467109163
shiftr_inplace 467460871
itos 476286924
addir 483029703
real_0_bit 484765470
affsr 501205509
stor 501645344
mpadd 575120569
negi 640835675
itor 717201064
Fl_neg 723466066
umodsu 734144403
expu 796671762
stoi 797315360
lg2prec 816258142
mpmul 839435726
rcopy 916643994
mpneg 926445401
affii 965430896
subrr 1006543121
cgetg_copy 1481759108
cmpuu 1490459507
cgetr 1876151566
togglesign 1953556072
minss 2026168769
absi 2067101722
mpabs 2138086652
setabssign 2205139247
Fl_sqr_pre 2345296603
nbits2lg 2404851090
expi 2423208511
Fl_mul 2437088248
addrr 2933982211
remii 3059353575
adduu 3444233453
stackdummy 3651651931
Fl_mul_pre 4224252119
leafcopy 5003238525
shift_right 5736111445
Fl_add 6105877389
dvmdsBIL 7152290171
Fl_sub 7382726839
Fl_addmul_pre 7658504219
subii 7718273142
shift_left 7798129154
uutoi 8930666241
icopy 9066240749
maxss 9680828614
utoi 12044552581
addii 12545568761
evalexpo 13401868880
utoipos 14262630142
gc_const 15648620495
cgetipos 16440036030
cgetg 25438168028
cgeti 27457361586
new_chunk 94872364994
evallg 96633514145
set_avma 131094678095

Generated by: LCOV version 1.16