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 30615-cf6389b5bf) Lines: 605 680 89.0 %
Date: 2026-01-16 09:21:08 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 43740
sdivsi 102150
stack_calloc 110361
gc_stoi 155884
dvdui 167195
subis 170919
Fl_ellj_pre 238041
mod16 241108
mindd 264340
truedivis 266949
cmpri 282310
Mod32 311108
uutoineg 362810
Mod16 389733
cgetg_block 407168
gc_utoi 468646
dvdiu 576271
mpdiv 665626
cmpsr 796104
rdivss 839647
real2n 1067030
addri 1105712
gc_utoipos 1153458
real_0 1156424
equalis 1185548
equalsi 1185730
mpround 1216585
absrnz_equal2n 1292609
umodui 1296276
cmpss 1379853
Mod8 2073715
mpcmp 2225868
Mod2 2370251
udivuu_rem 2416412
gc_int 2631175
mulru 2765892
subir 3005081
equaliu 3018187
equalui 3018188
itou_or_0 3041719
maxdd 3178456
cmpis 3634839
negr 3671141
cmpsi 3866837
ceildivuu 3901792
Fl_center 4485954
absrnz_equal1 4519917
real_1_bit 4704899
maxuu 4815093
mod4 5083734
umuluu_or_0 5526514
umuluu_le 5803291
subsi 6093413
subri 6140224
truedivsi 6202031
affsi 6373154
mulrs 7181596
fractor 7376769
gc_NULL 7962179
cmpir 9434749
ugcdiu 10114319
cmpui 10132498
cmpiu 10132568
affectsign_safe 10726353
uabsdiviu_rem 11892741
addrs 12305135
smodss 12491218
rdivii 13101167
rdiviiz 13146275
mod8 13163425
mpabs_shallow 13428463
utor 13461797
affur 13461883
divii 14049578
subrs 16475630
dvdii 16568925
Fl_halve 18746946
modis 19638526
int_bit 20954967
smodis 21176060
evalvalser 21527935
hammingu 24048424
abscmpui 33215725
abscmpiu 33215744
mulri 38033606
mpexpo 38876972
absequaliu 39659967
absequalui 41408903
itos_or_0 43598449
Mod4 43774834
modsi 45225535
affui 45473823
Fl_div 46486648
stack_malloc 46627266
truedivii 47039663
umodi2n 48918060
sdivsi_rem 51429862
gc_bool 51991974
gc_ulong 52041719
affrr_fixlg 54651091
stack_malloc_align 55502113
absi_shallow 58264461
mod2 61113135
Fl_addmulmul_pre 64490572
minuu 69276370
remlll_pre 75536581
evalprecp 78665545
evalvalp 81622096
mpsqr 91031050
Fl_triple 93927635
Fl_sqr 95843367
addiu 97107111
addui 100751090
mod2BIL 103304389
fixlg 104194063
mpodd 115076373
icopyspec 117424592
togglesign_safe 125522260
real_1 129819701
subiu 131841638
subui 136814552
mpshift 153142250
dvmduBIL 165611738
shiftr 177973843
itou 178232905
addis 181579711
gc_double 184138442
vali 190377419
varncmp 217202985
gc_long 242311767
mpsub 251612360
utoineg 293944089
cgetineg 294805226
rtor 295241956
addsi 306763687
muliu 374485608
itos 462153384
shiftr_inplace 463880457
mulis 466255761
Fl_double 466939643
real_0_bit 479354278
addir 481407791
affsr 486072953
stor 486375051
mpadd 574582863
negi 636826612
itor 714703832
Fl_neg 719051295
umodsu 723905845
stoi 772785398
expu 775262195
lg2prec 799616736
mpmul 837788131
rcopy 903145393
affii 910064434
mpneg 916741351
subrr 1000155032
cgetg_copy 1480075472
cmpuu 1492605156
cgetr 1840064255
togglesign 1911814031
minss 2008698515
absi 2068291017
mpabs 2139068304
Fl_sqr_pre 2165304120
setabssign 2205764483
nbits2lg 2366276235
Fl_mul 2419265640
expi 2448292839
addrr 2876105314
remii 3004306698
adduu 3410160882
stackdummy 3642431908
Fl_mul_pre 4075692597
Fl_add 4386160210
leafcopy 4973369600
shift_right 5627058620
dvmdsBIL 7006330440
Fl_sub 7255157563
Fl_addmul_pre 7652990994
subii 7654536611
shift_left 7675904042
uutoi 8806662630
icopy 9050916281
maxss 9695511908
utoi 11896880708
addii 12400712640
evalexpo 13129878270
utoipos 14140281352
gc_const 15508509916
cgetipos 16303097588
cgetg 24534906236
cgeti 27090123344
new_chunk 93203908734
evallg 95171893031
set_avma 128932038962

Generated by: LCOV version 1.16