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 30595-a3cd9a95e8) Lines: 605 680 89.0 %
Date: 2026-01-04 09:21:39 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 43788
sdivsi 102151
stack_calloc 110367
gc_stoi 155881
dvdui 167195
subis 170920
Fl_ellj_pre 238066
mod16 241099
mindd 264339
truedivis 266953
cmpri 282310
Mod32 311108
uutoineg 362610
Mod16 389733
cgetg_block 407142
gc_utoi 468606
dvdiu 576266
mpdiv 665644
cmpsr 796113
rdivss 839647
real2n 1067019
addri 1105799
gc_utoipos 1153460
real_0 1156423
equalis 1181959
equalsi 1182141
mpround 1216596
absrnz_equal2n 1292693
umodui 1296276
cmpss 1379853
Mod8 2073963
mpcmp 2225810
Mod2 2370233
udivuu_rem 2416412
gc_int 2631202
mulru 2765892
subir 3005099
equaliu 3018185
equalui 3018186
itou_or_0 3041664
maxdd 3177377
cmpis 3634840
negr 3671434
cmpsi 3866839
ceildivuu 3881403
Fl_center 4486173
absrnz_equal1 4520465
real_1_bit 4704800
maxuu 4815143
mod4 5083865
umuluu_or_0 5523384
umuluu_le 5803291
subsi 6093484
subri 6121914
truedivsi 6202031
affsi 6373073
mulrs 7181596
fractor 7376762
gc_NULL 7961246
cmpir 9431939
ugcdiu 10104359
cmpiu 10117473
cmpui 10117486
affectsign_safe 10727429
uabsdiviu_rem 11892741
addrs 12305702
smodss 12476724
rdivii 13101779
rdiviiz 13145508
mod8 13163511
mpabs_shallow 13428463
utor 13461782
affur 13461879
divii 14050917
subrs 16476283
dvdii 16556393
Fl_halve 18785887
modis 19638526
int_bit 20926472
smodis 21176060
evalvalser 21527935
hammingu 24048279
abscmpiu 33875539
abscmpui 33875661
mulri 38033692
mpexpo 38873061
absequaliu 39660786
absequalui 41409716
itos_or_0 43599167
Mod4 43735682
modsi 45225503
affui 45473824
Fl_div 46550093
stack_malloc 46626941
truedivii 47016650
umodi2n 48879369
sdivsi_rem 51429830
gc_bool 51986534
gc_ulong 52050706
affrr_fixlg 54653046
stack_malloc_align 55492269
absi_shallow 58915712
mod2 61111773
Fl_addmulmul_pre 64552295
minuu 69161635
remlll_pre 75716762
evalprecp 78663052
evalvalp 81620292
mpsqr 91015446
Fl_triple 94417549
Fl_sqr 95873522
addiu 98422637
addui 102066698
mod2BIL 103301154
fixlg 104195957
mpodd 115074449
icopyspec 117107278
togglesign_safe 125614882
real_1 129806685
subiu 131455646
subui 136428112
mpshift 153212613
dvmduBIL 165588047
itou 177597314
shiftr 177972070
addis 181573936
gc_double 184172939
vali 190372978
varncmp 217206699
gc_long 242174165
mpsub 251528089
utoineg 293820073
cgetineg 294681752
rtor 295249120
addsi 306758933
muliu 371789159
itos 462119477
shiftr_inplace 464104389
mulis 464499104
Fl_double 468747792
real_0_bit 479098227
addir 480543375
affsr 486145864
stor 486458997
mpadd 574236778
negi 636758785
itor 713317550
Fl_neg 719306339
umodsu 723938543
stoi 772643819
expu 775328677
lg2prec 798340865
mpmul 837392174
rcopy 903207055
affii 910262098
mpneg 916688627
subrr 1000196326
cgetg_copy 1479990844
cmpuu 1492637911
cgetr 1838776712
togglesign 1911361877
minss 2009233627
absi 2067774933
mpabs 2138550113
Fl_sqr_pre 2173120882
setabssign 2205234193
nbits2lg 2364202419
Fl_mul 2421189138
expi 2446241740
addrr 2877285011
remii 3003974734
adduu 3413527182
stackdummy 3647665954
Fl_mul_pre 4089214684
Fl_add 4397274186
leafcopy 4972924884
shift_right 5630281331
dvmdsBIL 7006918803
Fl_sub 7289438947
subii 7652065897
Fl_addmul_pre 7670012315
shift_left 7673257006
uutoi 8816358656
icopy 9053730348
maxss 9723818600
utoi 11910628699
addii 12409035125
evalexpo 13128738003
utoipos 14156683483
gc_const 15489387649
cgetipos 16325464508
cgetg 24556908815
cgeti 27095910831
new_chunk 93211745417
evallg 95185087469
set_avma 128936080436

Generated by: LCOV version 1.16