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 30764-6b81f1f3fa) Lines: 605 680 89.0 %
Date: 2026-03-24 09:26:44 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
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 3313
stack_calloc_align 3325
varnmin 10374
uabsdivui_rem 16693
absr 19040
addss 25067
subss 25067
subuu 25067
dvdis 33730
cmprs 40996
cgetr_block 44295
sdivsi 102151
stack_calloc 110675
gc_stoi 155900
dvdui 167195
subis 171740
Fl_ellj_pre 238039
mindd 264381
truedivis 268379
cmpri 284263
mod16 307019
Mod32 311108
uutoineg 363412
Mod16 389733
cgetg_block 426328
gc_utoi 468781
dvdiu 576273
mpdiv 665531
cmpsr 796107
rdivss 839647
real2n 1068604
addri 1106243
equalis 1151106
equalsi 1151289
gc_utoipos 1153588
real_0 1157752
mpround 1216587
umodui 1290953
absrnz_equal2n 1300286
cmpss 1392943
Mod8 2074184
mpcmp 2226359
Mod2 2370165
udivuu_rem 2418379
gc_int 2742579
mulru 2765892
subir 3004979
equalui 3021715
equaliu 3021716
itou_or_0 3147001
maxdd 3211376
cmpis 3634524
negr 3682960
cmpsi 3866523
ceildivuu 3903855
Fl_center 4486193
absrnz_equal1 4553847
real_1_bit 4714004
mod4 5141097
subri 6058429
subsi 6184553
truedivsi 6202031
umuluu_or_0 6234489
affsi 6446106
maxuu 6610631
mulrs 7181596
fractor 7379034
umuluu_le 7617880
gc_NULL 7962719
cmpir 9460208
ugcdiu 10319438
affectsign_safe 10730923
uabsdiviu_rem 11892741
addrs 12360968
smodss 12602758
cmpui 12986067
cmpiu 12986345
rdivii 13108065
rdiviiz 13149544
mpabs_shallow 13428463
divii 14059893
utor 14335057
affur 14335168
mod8 15588119
subrs 16536272
dvdii 16892714
Fl_halve 18829528
modis 19638526
int_bit 20953059
smodis 21176081
hammingu 24048659
evalvalser 24359582
abscmpiu 33746306
abscmpui 33746374
mulri 38284734
mpexpo 38874104
absequaliu 39540508
absequalui 41290511
Mod4 43857420
itos_or_0 44910987
modsi 45242095
affui 45491533
Fl_div 46830663
stack_malloc 46928844
umodi2n 49001275
sdivsi_rem 51446425
gc_ulong 52096099
truedivii 54730749
stack_malloc_align 55535161
affrr_fixlg 56109601
gc_bool 56164306
absi_shallow 57796456
mod2 61680903
Fl_addmulmul_pre 64736025
minuu 69629841
remlll_pre 76337289
evalprecp 78679288
evalvalp 81635911
mpsqr 91040634
Fl_triple 91226975
Fl_sqr 99555561
addiu 99556989
addui 103632040
fixlg 105720515
mod2BIL 106540227
mpodd 115184353
icopyspec 117797607
subiu 133395849
real_1 133616477
subui 138371774
mpshift 153566279
togglesign_safe 157332918
dvmduBIL 161282552
itou 179068086
gc_double 184197241
shiftr 187932831
vali 190835556
addis 194741209
varncmp 198759295
gc_long 242628573
mpsub 251583042
utoineg 297828104
cgetineg 298688294
rtor 303765278
addsi 319927963
muliu 376542915
Fl_double 453324856
mulis 467135617
shiftr_inplace 467451184
itos 476301102
addir 483054637
real_0_bit 484510843
affsr 501278248
stor 501665601
mpadd 574834450
negi 640926847
itor 717154719
Fl_neg 723638847
umodsu 734202056
expu 796757059
stoi 797196360
lg2prec 816153714
mpmul 839098211
rcopy 916855275
mpneg 926591419
affii 965518015
subrr 1006402863
cgetg_copy 1482393348
cmpuu 1490482262
cgetr 1876315503
togglesign 1953962014
minss 2026059705
absi 2067140258
mpabs 2138116241
setabssign 2205187869
Fl_sqr_pre 2349059741
nbits2lg 2404760415
expi 2423155071
Fl_mul 2441980325
addrr 2934472687
remii 3060308731
adduu 3450523874
stackdummy 3667433088
Fl_mul_pre 4234830298
leafcopy 5004840001
shift_right 5736817624
Fl_add 6139038516
dvmdsBIL 7153229723
Fl_sub 7443040324
Fl_addmul_pre 7671128235
subii 7719145088
shift_left 7799770088
uutoi 8947643158
icopy 9065929166
maxss 9736982188
utoi 12067721754
addii 12548269654
evalexpo 13403054147
utoipos 14283538105
gc_const 15648669314
cgetipos 16467732662
cgetg 25472664846
cgeti 27486313785
new_chunk 94951328913
evallg 96716502874
set_avma 131183660860

Generated by: LCOV version 1.16