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: 605 680 89.0 %
Date: 2026-02-01 09:23: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
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 43791
sdivsi 102150
stack_calloc 110363
gc_stoi 155885
dvdui 167195
subis 170919
Fl_ellj_pre 238068
mod16 241110
mindd 264341
truedivis 266966
cmpri 282310
Mod32 311108
uutoineg 362753
Mod16 389733
cgetg_block 424826
gc_utoi 468585
dvdiu 576270
mpdiv 665644
cmpsr 796108
rdivss 839647
real2n 1067053
addri 1106262
gc_utoipos 1153500
real_0 1156523
equalis 1185794
equalsi 1185976
mpround 1216578
absrnz_equal2n 1292659
umodui 1296276
cmpss 1392943
Mod8 2073789
mpcmp 2226414
Mod2 2370039
udivuu_rem 2416419
gc_int 2631164
mulru 2765892
subir 3005113
equaliu 3018244
equalui 3018244
itou_or_0 3041723
maxdd 3178539
cmpis 3634909
negr 3671526
cmpsi 3866909
ceildivuu 3903003
Fl_center 4486193
absrnz_equal1 4520017
real_1_bit 4705012
maxuu 4814711
mod4 5082361
umuluu_or_0 5508584
umuluu_le 5803291
subsi 6093483
subri 6143485
truedivsi 6202031
affsi 6373281
mulrs 7181596
fractor 7376918
gc_NULL 7961920
cmpir 9435867
ugcdiu 10113880
cmpiu 10134127
cmpui 10134132
affectsign_safe 10727863
uabsdiviu_rem 11892741
addrs 12305297
smodss 12579423
rdivii 13105621
rdiviiz 13148351
mod8 13161845
mpabs_shallow 13428463
utor 13461926
affur 13462044
divii 14057706
subrs 16476200
dvdii 16552561
Fl_halve 18810131
modis 19638526
int_bit 20969235
smodis 21176060
evalvalser 21527935
hammingu 24048426
abscmpiu 34390230
abscmpui 34390390
mulri 38033900
mpexpo 38878400
absequaliu 39660801
absequalui 41409653
itos_or_0 43600710
Mod4 43785200
modsi 45225521
affui 45473825
Fl_div 46573319
stack_malloc 46625281
truedivii 47034626
umodi2n 48928125
sdivsi_rem 51429867
gc_bool 51977244
gc_ulong 52071125
affrr_fixlg 54655426
stack_malloc_align 55502997
absi_shallow 59439208
mod2 61113364
Fl_addmulmul_pre 64701100
minuu 69291596
remlll_pre 76091843
evalprecp 78670897
evalvalp 81628273
mpsqr 91037490
Fl_triple 94768245
Fl_sqr 95896131
addiu 99466230
addui 103110435
mod2BIL 103302597
fixlg 104198850
mpodd 115075642
icopyspec 117431199
togglesign_safe 125518342
real_1 129827874
subiu 131854755
subui 136828004
mpshift 153254777
dvmduBIL 163984929
shiftr 177988517
itou 178235567
addis 181593748
gc_double 184199198
vali 190366767
varncmp 217203105
gc_long 242314261
mpsub 251618069
utoineg 293934402
cgetineg 294795457
rtor 295260189
addsi 306780390
muliu 374570461
itos 462163029
shiftr_inplace 464422711
mulis 466293673
Fl_double 470249181
real_0_bit 479380459
addir 481452094
affsr 486187622
stor 486491710
mpadd 574571809
negi 636921001
itor 715047349
Fl_neg 719677401
umodsu 723969399
stoi 772746136
expu 775464805
lg2prec 800029232
mpmul 837877444
rcopy 903330651
affii 910786177
mpneg 916879038
subrr 1000368734
cgetg_copy 1480215795
cmpuu 1492954615
cgetr 1840715166
togglesign 1912725588
minss 2010923235
absi 2067624706
mpabs 2138415114
Fl_sqr_pre 2178912689
setabssign 2205145075
nbits2lg 2366815620
Fl_mul 2424920747
expi 2448904399
addrr 2878518071
remii 3008009535
adduu 3413629110
stackdummy 3652117235
Fl_mul_pre 4104792957
Fl_add 4405649547
leafcopy 4972836865
shift_right 5635153277
dvmdsBIL 7014156180
Fl_sub 7307400360
subii 7640686615
shift_left 7679080259
Fl_addmul_pre 7682295525
uutoi 8815799530
icopy 9051404366
maxss 9738787094
utoi 11906496229
addii 12404945400
evalexpo 13141411844
utoipos 14154681681
gc_const 15510529155
cgetipos 16324717531
cgetg 24581189743
cgeti 27093703437
new_chunk 93260484575
evallg 95245426245
set_avma 129035865490

Generated by: LCOV version 1.16