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 30711-c92306d4b4) Lines: 605 680 89.0 %
Date: 2026-02-24 09:25:14 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 14728
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33723
cmprs 40996
cgetr_block 43754
sdivsi 102150
stack_calloc 110502
gc_stoi 155888
dvdui 167195
subis 171739
Fl_ellj_pre 238056
mindd 264338
truedivis 266956
cmpri 282310
mod16 307019
Mod32 311108
uutoineg 364234
Mod16 389733
cgetg_block 424989
gc_utoi 468579
dvdiu 576271
mpdiv 665638
cmpsr 796098
rdivss 839647
real2n 1067049
addri 1106284
equalis 1151086
equalsi 1151268
gc_utoipos 1153494
real_0 1156500
mpround 1216576
umodui 1290981
absrnz_equal2n 1292649
cmpss 1392943
Mod8 2074349
mpcmp 2226390
Mod2 2370347
udivuu_rem 2418330
gc_int 2631182
mulru 2765892
subir 3005088
equaliu 3018280
equalui 3018280
itou_or_0 3146858
maxdd 3178451
cmpis 3633522
negr 3671854
cmpsi 3865520
ceildivuu 3906318
Fl_center 4486195
absrnz_equal1 4519948
real_1_bit 4704959
maxuu 4815706
mod4 5139945
umuluu_le 5803291
subri 6096948
umuluu_or_0 6145668
subsi 6183139
truedivsi 6202031
affsi 6437465
mulrs 7181596
fractor 7376916
gc_NULL 7962669
cmpir 9449779
ugcdiu 10147097
affectsign_safe 10727532
uabsdiviu_rem 11892741
cmpiu 12183384
cmpui 12183431
addrs 12305018
smodss 12651842
rdivii 13104798
rdiviiz 13146783
mpabs_shallow 13428463
utor 13461851
affur 13461970
divii 14047307
mod8 15580483
subrs 16475890
dvdii 16905560
Fl_halve 18833924
modis 19638526
int_bit 20973798
smodis 21176074
evalvalser 21529076
hammingu 24048358
abscmpiu 31617179
abscmpui 31617221
mulri 38033996
mpexpo 38873502
absequaliu 39399165
absequalui 41148042
itos_or_0 43601272
Mod4 43853755
modsi 45225631
affui 45473825
Fl_div 46519403
stack_malloc 46823270
umodi2n 48998462
sdivsi_rem 51429965
gc_ulong 52071784
gc_bool 54082486
affrr_fixlg 54654923
truedivii 54715335
stack_malloc_align 55496821
absi_shallow 57149299
mod2 61230804
Fl_addmulmul_pre 64779098
minuu 69711301
remlll_pre 76015330
evalprecp 78671286
evalvalp 81627691
mpsqr 91033622
Fl_triple 91532659
addiu 95189703
addui 98837244
Fl_sqr 99496799
fixlg 104200585
mod2BIL 106068079
mpodd 115175128
icopyspec 117470696
real_1 129848842
subiu 131921347
subui 136894451
mpshift 153257761
togglesign_safe 157208899
dvmduBIL 161295272
shiftr 178071854
itou 178233310
gc_double 184142500
addis 184521022
vali 190460035
varncmp 217195011
gc_long 242526885
mpsub 251542395
rtor 295257503
utoineg 297168528
cgetineg 298030226
addsi 309706991
muliu 375662695
Fl_double 454015334
shiftr_inplace 464508095
mulis 467051950
itos 472263856
addir 481425912
real_0_bit 481522072
affsr 486336475
stor 486600517
mpadd 576377204
negi 638049879
itor 715169713
Fl_neg 723600943
umodsu 734193349
expu 775692118
stoi 797058248
lg2prec 800229341
mpmul 839632077
rcopy 903462773
mpneg 918000161
affii 957823341
subrr 1000229897
cgetg_copy 1480493723
cmpuu 1493848557
cgetr 1840972104
togglesign 1941529890
minss 2011018962
absi 2068414294
mpabs 2139225259
Fl_sqr_pre 2158258424
setabssign 2205953617
nbits2lg 2368883545
expi 2421926195
Fl_mul 2426028422
addrr 2880367746
remii 3020136772
adduu 3443978086
stackdummy 3628664209
Fl_mul_pre 4094024333
Fl_add 4400653349
leafcopy 4977739181
shift_right 5634215667
dvmdsBIL 7033220939
Fl_sub 7222364783
Fl_addmul_pre 7677580883
subii 7677813665
shift_left 7695562662
uutoi 8934116635
icopy 9060969425
maxss 9710607862
utoi 12048082095
addii 12499265807
evalexpo 13166706999
utoipos 14259402769
gc_const 15499761892
cgetipos 16426871044
cgetg 24635050409
cgeti 27280772395
new_chunk 93680621267
evallg 95431019808
set_avma 129542104582

Generated by: LCOV version 1.16