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 30604-e5d817ee12) Lines: 605 680 89.0 %
Date: 2026-01-10 09:22:24 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 43818
sdivsi 102151
stack_calloc 110371
gc_stoi 155884
dvdui 167195
subis 170920
Fl_ellj_pre 238047
mod16 241108
mindd 264339
truedivis 266947
cmpri 282310
Mod32 311108
uutoineg 362272
Mod16 389733
cgetg_block 407188
gc_utoi 468556
dvdiu 576270
mpdiv 665637
cmpsr 796109
rdivss 839647
real2n 1067007
addri 1105752
gc_utoipos 1153494
real_0 1156458
equalis 1185558
equalsi 1185739
mpround 1216593
absrnz_equal2n 1292565
umodui 1296276
cmpss 1379853
Mod8 2073838
mpcmp 2225866
Mod2 2370114
udivuu_rem 2416412
gc_int 2631160
mulru 2765892
subir 3005109
equaliu 3018197
equalui 3018197
itou_or_0 3041726
maxdd 3178455
cmpis 3634852
negr 3671266
cmpsi 3866852
ceildivuu 3903251
Fl_center 4486192
absrnz_equal1 4519922
real_1_bit 4704765
maxuu 4815131
mod4 5083727
umuluu_or_0 5537335
umuluu_le 5803291
subsi 6093543
subri 6139698
truedivsi 6202031
affsi 6373092
mulrs 7181596
fractor 7376769
gc_NULL 7962859
cmpir 9433286
ugcdiu 10113960
cmpiu 10132266
cmpui 10132288
affectsign_safe 10727399
uabsdiviu_rem 11892741
addrs 12304962
smodss 12485549
rdivii 13101852
rdiviiz 13145562
mod8 13163593
mpabs_shallow 13428463
utor 13461759
affur 13461880
divii 14050015
subrs 16475496
dvdii 16556629
Fl_halve 18785880
modis 19638526
int_bit 20958605
smodis 21176060
evalvalser 21527935
hammingu 24048458
abscmpiu 32412888
abscmpui 32413078
mulri 38033718
mpexpo 38878209
absequaliu 39661006
absequalui 41409799
itos_or_0 43599181
Mod4 43776670
modsi 45225550
affui 45473825
Fl_div 46554020
stack_malloc 46627276
truedivii 47034637
umodi2n 48919844
sdivsi_rem 51429876
gc_bool 51981711
gc_ulong 52063546
affrr_fixlg 54652673
stack_malloc_align 55502044
absi_shallow 57463315
mod2 61113132
Fl_addmulmul_pre 64588100
minuu 69256120
remlll_pre 75716569
evalprecp 78666228
evalvalp 81623604
mpsqr 91033565
Fl_triple 94352228
addiu 95501850
Fl_sqr 95822140
addui 99145830
mod2BIL 103304544
fixlg 104196166
mpodd 115076721
icopyspec 117425191
togglesign_safe 125516999
real_1 129817905
subiu 131840947
subui 136813674
mpshift 153178665
dvmduBIL 165759943
shiftr 177969564
itou 178232865
addis 181543332
gc_double 184164152
vali 190377413
varncmp 217203058
gc_long 242316028
mpsub 251615260
utoineg 293946317
cgetineg 294807642
rtor 295238931
addsi 306728026
muliu 374482085
itos 462152965
shiftr_inplace 464162577
mulis 466260928
Fl_double 468714277
real_0_bit 479184173
addir 481426341
affsr 486049749
stor 486429637
mpadd 574433707
negi 636836623
itor 714890436
Fl_neg 719267056
umodsu 723959433
stoi 772694853
expu 775342786
lg2prec 799871757
mpmul 837658368
rcopy 903221941
affii 910163341
mpneg 916752578
subrr 1000166840
cgetg_copy 1480086010
cmpuu 1492642640
cgetr 1840155058
togglesign 1912164641
minss 2009438841
absi 2068411407
mpabs 2139197687
Fl_sqr_pre 2174377546
setabssign 2205929218
nbits2lg 2366043482
Fl_mul 2418053512
expi 2448567299
addrr 2877095608
remii 3004634207
adduu 3408523511
stackdummy 3637754758
Fl_mul_pre 4089437928
Fl_add 4399054886
leafcopy 4973767139
shift_right 5631188837
dvmdsBIL 7009375046
Fl_sub 7257209733
subii 7654003256
Fl_addmul_pre 7663508946
shift_left 7675463748
uutoi 8807260709
icopy 9052463960
maxss 9692194231
utoi 11896506443
addii 12404170397
evalexpo 13132027038
utoipos 14144026760
gc_const 15508484459
cgetipos 16309120816
cgetg 24541314830
cgeti 27091916510
new_chunk 93211167161
evallg 95184552039
set_avma 128962914797

Generated by: LCOV version 1.16