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 30718-589d22da69) Lines: 605 680 89.0 %
Date: 2026-02-27 09:23:18 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 14728
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33723
cmprs 40996
cgetr_block 43652
sdivsi 102149
stack_calloc 110498
gc_stoi 155882
dvdui 167195
subis 171739
Fl_ellj_pre 238033
mindd 264338
truedivis 266936
cmpri 282310
mod16 306999
Mod32 311108
uutoineg 363043
Mod16 389733
cgetg_block 425079
gc_utoi 468559
dvdiu 576272
mpdiv 665643
cmpsr 796089
rdivss 839647
real2n 1066994
addri 1106207
equalis 1151097
equalsi 1151279
gc_utoipos 1153484
real_0 1156535
mpround 1216585
umodui 1290981
absrnz_equal2n 1292670
cmpss 1392943
Mod8 2074051
mpcmp 2226364
Mod2 2370032
udivuu_rem 2418330
gc_int 2631159
mulru 2765892
subir 3005100
equalui 3018292
equaliu 3018293
itou_or_0 3146830
maxdd 3178402
cmpis 3633398
negr 3671328
cmpsi 3865396
ceildivuu 3902829
Fl_center 4486117
absrnz_equal1 4519955
real_1_bit 4705011
maxuu 4815025
mod4 5139084
umuluu_le 5803291
subri 6141053
umuluu_or_0 6162752
subsi 6182726
truedivsi 6202031
affsi 6437596
mulrs 7181596
fractor 7376912
gc_NULL 7962735
cmpir 9434115
ugcdiu 10148072
affectsign_safe 10727510
uabsdiviu_rem 11892741
cmpui 12181697
cmpiu 12182017
addrs 12304914
smodss 12626845
rdivii 13103058
rdiviiz 13145539
mpabs_shallow 13428463
utor 13461735
affur 13461843
divii 14057762
mod8 15580583
subrs 16475734
dvdii 16902876
Fl_halve 18809247
modis 19638526
int_bit 20950909
smodis 21176074
evalvalser 21529076
hammingu 24048392
abscmpiu 33741798
abscmpui 33741852
mulri 38033900
mpexpo 38876140
absequaliu 39398426
absequalui 41147323
itos_or_0 43600802
Mod4 43838523
modsi 45225567
affui 45473824
Fl_div 46510806
stack_malloc 46823360
umodi2n 48982241
sdivsi_rem 51429881
gc_ulong 52034937
gc_bool 54083414
affrr_fixlg 54654322
truedivii 54742893
stack_malloc_align 55501308
absi_shallow 59276465
mod2 61230101
Fl_addmulmul_pre 64677675
minuu 69530167
remlll_pre 75959698
evalprecp 78669229
evalvalp 81626041
Fl_triple 90729842
mpsqr 91032279
Fl_sqr 99426251
addiu 99443726
addui 103091063
fixlg 104199961
mod2BIL 106064005
mpodd 115174302
icopyspec 117470178
real_1 129875353
subiu 131922211
subui 136895102
mpshift 153230095
togglesign_safe 157210916
dvmduBIL 161248060
shiftr 178054803
itou 178232726
gc_double 184169396
addis 184527605
vali 190458089
varncmp 217195135
gc_long 242520491
mpsub 251608560
rtor 295248615
utoineg 297155015
cgetineg 298015177
addsi 309713815
muliu 375510869
Fl_double 451026492
shiftr_inplace 464468739
mulis 467041729
itos 472297013
real_0_bit 479467033
addir 481419296
affsr 486100987
stor 486483008
mpadd 574637134
negi 637994254
itor 715248098
Fl_neg 723579631
umodsu 734135745
expu 775569686
stoi 796694295
lg2prec 800208912
mpmul 837923577
rcopy 903362986
mpneg 917941661
affii 957692740
subrr 1000252200
cgetg_copy 1481378122
cmpuu 1493824012
cgetr 1840779219
togglesign 1941154608
minss 2010153390
absi 2068333482
mpabs 2139129048
Fl_sqr_pre 2149855111
setabssign 2205817510
nbits2lg 2367271627
expi 2421815299
Fl_mul 2430742701
addrr 2877771386
remii 3018117318
adduu 3445816450
stackdummy 3639655935
Fl_mul_pre 4066115409
Fl_add 4360677064
leafcopy 4978293488
shift_right 5632238268
dvmdsBIL 7030662282
Fl_sub 7231628013
Fl_addmul_pre 7644664275
subii 7675994103
shift_left 7693660531
uutoi 8922230778
icopy 9058750972
maxss 9727843986
utoi 12039026186
addii 12492355197
evalexpo 13158564054
utoipos 14251131697
gc_const 15498213553
cgetipos 16413282448
cgetg 24635795686
cgeti 27255842582
new_chunk 93621773586
evallg 95408715577
set_avma 129485579898

Generated by: LCOV version 1.16