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 30604-e5d817ee12) Lines: 605 680 89.0 %
Date: 2026-01-09 09:21:43 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 43776
sdivsi 102151
stack_calloc 110357
gc_stoi 155888
dvdui 167195
subis 170920
Fl_ellj_pre 238056
mod16 241108
mindd 264340
truedivis 266956
cmpri 282310
Mod32 311108
uutoineg 362403
Mod16 389733
cgetg_block 407180
gc_utoi 468610
dvdiu 576264
mpdiv 665635
cmpsr 796103
rdivss 839647
real2n 1067014
addri 1105810
gc_utoipos 1153487
real_0 1156408
equalis 1185576
equalsi 1185758
mpround 1216578
absrnz_equal2n 1292623
umodui 1296276
cmpss 1379853
Mod8 2073906
mpcmp 2225858
Mod2 2370170
udivuu_rem 2416412
gc_int 2631156
mulru 2765892
subir 3005104
equaliu 3018196
equalui 3018196
itou_or_0 3041710
maxdd 3178445
cmpis 3634764
negr 3671368
cmpsi 3866764
ceildivuu 3900809
Fl_center 4486195
absrnz_equal1 4519822
real_1_bit 4704809
maxuu 4815164
mod4 5083778
umuluu_or_0 5508816
umuluu_le 5803291
subsi 6093481
subri 6114395
truedivsi 6202031
affsi 6373097
mulrs 7181596
fractor 7376765
gc_NULL 7962400
cmpir 9430636
ugcdiu 10112983
cmpiu 10132156
cmpui 10132194
affectsign_safe 10727241
uabsdiviu_rem 11892741
addrs 12304860
smodss 12504420
rdivii 13102507
rdiviiz 13146015
mod8 13162748
mpabs_shallow 13428463
utor 13461756
affur 13461877
divii 14042363
subrs 16475388
dvdii 16562089
Fl_halve 18790336
modis 19638526
int_bit 20939440
smodis 21176060
evalvalser 21527935
hammingu 24048413
abscmpiu 32699799
abscmpui 32700010
mulri 38033574
mpexpo 38870740
absequaliu 39660490
absequalui 41409375
itos_or_0 43599942
Mod4 43769799
modsi 45225500
affui 45473825
Fl_div 46535022
stack_malloc 46626943
truedivii 47021116
umodi2n 48913289
sdivsi_rem 51429827
gc_bool 51984837
gc_ulong 52062370
affrr_fixlg 54652627
stack_malloc_align 55493332
absi_shallow 57750290
mod2 61112015
Fl_addmulmul_pre 64611599
minuu 69235120
remlll_pre 75745126
evalprecp 78669910
evalvalp 81626930
mpsqr 91008572
Fl_triple 94391898
Fl_sqr 95830985
addiu 96088102
addui 99732127
mod2BIL 103300241
fixlg 104196545
mpodd 115074697
icopyspec 117424777
togglesign_safe 125507330
real_1 129798303
subiu 131839492
subui 136812332
mpshift 153190413
dvmduBIL 165754040
shiftr 177960368
itou 178232832
addis 181534578
gc_double 184124126
vali 190377402
varncmp 217203274
gc_long 242313905
mpsub 251462325
utoineg 293940676
cgetineg 294801840
rtor 295238129
addsi 306718613
muliu 374340819
itos 462134183
shiftr_inplace 464274334
mulis 466281198
Fl_double 468649464
real_0_bit 479048101
addir 481405934
affsr 486082256
stor 486446777
mpadd 574155760
negi 636862568
itor 714695050
Fl_neg 719369982
umodsu 723944438
stoi 772657060
expu 775351572
lg2prec 799818016
mpmul 837252483
rcopy 903158986
affii 910382072
mpneg 916772601
subrr 1000046292
cgetg_copy 1480058391
cmpuu 1492596152
cgetr 1839984990
togglesign 1912058509
minss 2009402181
absi 2068341039
mpabs 2139109539
Fl_sqr_pre 2176391001
setabssign 2205835046
nbits2lg 2365670789
Fl_mul 2419487007
expi 2448381741
addrr 2876513929
remii 3003691785
adduu 3409350141
stackdummy 3640064090
Fl_mul_pre 4094883268
Fl_add 4398369053
leafcopy 4973665405
shift_right 5631344361
dvmdsBIL 7009293938
Fl_sub 7258241055
subii 7653472850
Fl_addmul_pre 7674257796
shift_left 7675411788
uutoi 8809188056
icopy 9051895646
maxss 9693487862
utoi 11899342808
addii 12404267123
evalexpo 13132478278
utoipos 14146905381
gc_const 15508547743
cgetipos 16311934283
cgetg 24545412113
cgeti 27091242521
new_chunk 93207076992
evallg 95190735621
set_avma 128960077344

Generated by: LCOV version 1.16