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 30735-65f72320ad) Lines: 605 680 89.0 %
Date: 2026-03-14 09:23:49 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 10374
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33730
cmprs 40996
cgetr_block 43813
sdivsi 102148
stack_calloc 110576
gc_stoi 155900
dvdui 167195
subis 171737
Fl_ellj_pre 238045
mindd 264380
truedivis 266970
cmpri 282310
mod16 307011
Mod32 311108
uutoineg 363305
Mod16 389733
cgetg_block 425242
gc_utoi 468734
dvdiu 576278
mpdiv 665536
cmpsr 796103
rdivss 839647
real2n 1067465
addri 1106303
equalis 1151006
equalsi 1151188
gc_utoipos 1153568
real_0 1156646
mpround 1216578
umodui 1290953
absrnz_equal2n 1292545
cmpss 1392943
Mod8 2074117
mpcmp 2226369
Mod2 2370182
udivuu_rem 2418379
gc_int 2631171
mulru 2765892
subir 3004978
equalui 3018939
equaliu 3018943
itou_or_0 3147013
maxdd 3179573
cmpis 3633566
negr 3671774
cmpsi 3865565
ceildivuu 3902772
Fl_center 4486192
absrnz_equal1 4520261
real_1_bit 4707088
maxuu 4815231
mod4 5139238
umuluu_le 5803291
subri 6050455
umuluu_or_0 6162169
subsi 6182803
truedivsi 6202031
affsi 6439617
mulrs 7181596
fractor 7376916
gc_NULL 7961506
cmpir 9450442
ugcdiu 10147606
affectsign_safe 10728868
uabsdiviu_rem 11892741
cmpiu 12179672
cmpui 12179824
addrs 12304990
smodss 12590811
rdivii 13103821
rdiviiz 13146243
mpabs_shallow 13428463
utor 13463069
affur 13463182
divii 14048551
mod8 15577247
subrs 16477980
dvdii 16897910
Fl_halve 18822130
modis 19638526
int_bit 20948133
smodis 21176081
evalvalser 21529069
hammingu 24048773
abscmpiu 32623935
abscmpui 32625122
mulri 38033912
mpexpo 38871857
absequaliu 39352719
absequalui 41101668
itos_or_0 43601358
Mod4 43856089
modsi 45225691
affui 45473825
Fl_div 46576808
stack_malloc 46825243
umodi2n 49000166
sdivsi_rem 51430018
gc_ulong 52060470
affrr_fixlg 54655557
truedivii 54665420
stack_malloc_align 55520612
gc_bool 56135714
absi_shallow 56592414
mod2 61230600
Fl_addmulmul_pre 64711854
minuu 69590187
remlll_pre 76038022
evalprecp 78674319
evalvalp 81630976
mpsqr 91033165
Fl_triple 91141112
addiu 97221781
Fl_sqr 99449804
addui 100869291
fixlg 104201887
mod2BIL 106063985
mpodd 115175884
icopyspec 117467953
real_1 129835308
subiu 131921926
subui 136896805
mpshift 153317499
togglesign_safe 157157500
dvmduBIL 161358508
shiftr 178078725
itou 178237337
gc_double 184097862
addis 184538123
vali 190427052
varncmp 198517209
gc_long 242533791
mpsub 251538992
rtor 295299766
utoineg 297185257
cgetineg 298046297
addsi 309724471
muliu 375527443
Fl_double 452829422
shiftr_inplace 464507873
mulis 467010005
itos 472214378
real_0_bit 479740334
addir 481418566
affsr 486267888
stor 486578385
mpadd 574710963
negi 640344652
itor 715037054
Fl_neg 723740838
umodsu 734149590
expu 775693466
stoi 796713854
lg2prec 800230671
mpmul 837940897
rcopy 903399654
mpneg 920333878
affii 957379792
subrr 1000239258
cgetg_copy 1487210289
cmpuu 1490438217
cgetr 1840703591
togglesign 1943369679
minss 2009382665
absi 2065913021
mpabs 2136778402
Fl_sqr_pre 2155150142
setabssign 2203479450
nbits2lg 2367389592
expi 2421886132
Fl_mul 2428956736
addrr 2877775713
remii 3018236124
adduu 3443978160
stackdummy 3653157392
Fl_mul_pre 4095014034
Fl_add 4398040812
leafcopy 4978455281
shift_right 5632944439
dvmdsBIL 7030945537
Fl_sub 7229675802
subii 7682319500
Fl_addmul_pre 7683669902
shift_left 7693648498
uutoi 8927373105
icopy 9057930415
maxss 9713550006
utoi 12041600856
addii 12539651557
evalexpo 13161350358
utoipos 14252582398
gc_const 15582233517
cgetipos 16414949320
cgetg 24518803714
cgeti 27266214139
new_chunk 93543136824
evallg 95355707838
set_avma 129523575837

Generated by: LCOV version 1.16