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 30660-09c6d0ed2e) Lines: 607 680 89.3 %
Date: 2026-02-02 09:23:03 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 43817
sdivsi 102148
stack_calloc 110343
gc_stoi 155889
dvdui 167195
subis 170919
Fl_ellj_pre 238060
mod16 241107
mindd 264336
truedivis 266944
cmpri 282310
Mod32 311108
uutoineg 362615
Mod16 389733
cgetg_block 424849
gc_utoi 468634
dvdiu 576269
mpdiv 665641
cmpsr 796091
rdivss 839647
real2n 1067045
addri 1106238
gc_utoipos 1153473
real_0 1156486
equalis 1185415
equalsi 1185597
mpround 1216586
absrnz_equal2n 1292615
umodui 1296276
cmpss 1392943
Mod8 2073972
mpcmp 2226358
Mod2 2370166
udivuu_rem 2416419
gc_int 2631145
mulru 2765892
subir 3005087
equaliu 3018232
equalui 3018232
itou_or_0 3041722
maxdd 3178212
cmpis 3635004
negr 3671500
cmpsi 3867003
ceildivuu 3903280
Fl_center 4486195
absrnz_equal1 4519848
real_1_bit 4704901
maxuu 4814365
mod4 5083675
umuluu_or_0 5513303
umuluu_le 5803291
subsi 6093621
subri 6135996
truedivsi 6202031
affsi 6373161
mulrs 7181596
fractor 7376925
gc_NULL 7961392
cmpir 9431783
ugcdiu 10114278
cmpiu 10133218
cmpui 10133251
affectsign_safe 10726952
uabsdiviu_rem 11892741
addrs 12304832
smodss 12591231
rdivii 13105268
rdiviiz 13148455
mod8 13162608
mpabs_shallow 13428463
utor 13461940
affur 13462057
divii 14053653
subrs 16475565
dvdii 16565056
Fl_halve 18804556
modis 19638526
int_bit 20946961
smodis 21176060
evalvalser 21527935
hammingu 24048471
abscmpiu 32387035
abscmpui 32387232
mulri 38033852
mpexpo 38873428
absequaliu 39661415
absequalui 41410239
itos_or_0 43599714
Mod4 43782231
modsi 45225467
affui 45473825
Fl_div 46551346
stack_malloc 46624877
truedivii 47038419
umodi2n 48925907
sdivsi_rem 51429798
gc_bool 51987104
gc_ulong 52070949
affrr_fixlg 54653645
stack_malloc_align 55498420
absi_shallow 57437129
mod2 61113657
Fl_addmulmul_pre 64720141
minuu 69303313
remlll_pre 75886776
evalprecp 78663136
evalvalp 81620602
mpsqr 91023248
Fl_triple 94787972
addiu 95455852
Fl_sqr 95898463
addui 99100005
mod2BIL 103306108
fixlg 104197008
mpodd 115077168
icopyspec 117431026
togglesign_safe 125525058
real_1 129818637
subiu 131849758
subui 136822931
mpshift 153230356
dvmduBIL 165987874
shiftr 177983310
itou 178234153
addis 181581456
gc_double 184158941
vali 190366209
varncmp 217203081
gc_long 242319701
mpsub 251579203
utoineg 293936113
cgetineg 294797834
rtor 295249644
addsi 306767815
muliu 374460260
itos 462164540
shiftr_inplace 464367641
mulis 466296721
Fl_double 470256543
real_0_bit 479368819
addir 481436950
affsr 486135668
stor 486447413
mpadd 574539452
negi 636834747
itor 715140749
Fl_neg 719655122
umodsu 724006479
stoi 772785791
expu 775432211
lg2prec 800132584
mpmul 837803668
rcopy 903286467
affii 910712056
mpneg 916778049
subrr 1000248623
cgetg_copy 1480159815
cmpuu 1492947351
cgetr 1840664456
togglesign 1912598724
minss 2010526211
absi 2067596073
mpabs 2138379312
Fl_sqr_pre 2177072850
setabssign 2205108735
nbits2lg 2366614801
Fl_mul 2420282256
expi 2448750411
addrr 2878436583
remii 3007738898
adduu 3409045881
stackdummy 3641112830
Fl_mul_pre 4097160675
Fl_add 4403748329
leafcopy 4973294291
shift_right 5634495626
dvmdsBIL 7013014853
Fl_sub 7274044107
subii 7640691655
Fl_addmul_pre 7674019507
shift_left 7678400219
uutoi 8809453747
icopy 9050430462
maxss 9705480210
utoi 11895928739
addii 12404529475
evalexpo 13139257484
utoipos 14144102536
gc_const 15510334924
cgetipos 16313632225
cgetg 24556019726
cgeti 27078148453
new_chunk 93221992405
evallg 95186522382
set_avma 128981395988

Generated by: LCOV version 1.16