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 30603-c72b2decfc) Lines: 605 680 89.0 %
Date: 2026-01-07 09:21:48 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 43822
sdivsi 102149
stack_calloc 110357
gc_stoi 155887
dvdui 167195
subis 170919
Fl_ellj_pre 238057
mod16 241109
mindd 264337
truedivis 266933
cmpri 282310
Mod32 311108
uutoineg 362376
Mod16 389733
cgetg_block 407184
gc_utoi 468512
dvdiu 576268
mpdiv 665642
cmpsr 796102
rdivss 839647
real2n 1067006
addri 1105726
gc_utoipos 1153489
real_0 1156435
equalis 1185577
equalsi 1185759
mpround 1216576
absrnz_equal2n 1292630
umodui 1296276
cmpss 1379853
Mod8 2073846
mpcmp 2225891
Mod2 2370100
udivuu_rem 2416412
gc_int 2631177
mulru 2765892
subir 3005121
equaliu 3018206
equalui 3018206
itou_or_0 3041732
maxdd 3178372
cmpis 3634812
negr 3671400
cmpsi 3866814
ceildivuu 3901632
Fl_center 4486138
absrnz_equal1 4519795
real_1_bit 4704752
maxuu 4815179
mod4 5083738
umuluu_or_0 5524790
umuluu_le 5803291
subsi 6093651
subri 6125021
truedivsi 6202031
affsi 6373046
mulrs 7181596
fractor 7376773
gc_NULL 7961960
cmpir 9431432
ugcdiu 10114146
cmpiu 10131019
cmpui 10131037
affectsign_safe 10727543
uabsdiviu_rem 11892741
addrs 12304985
smodss 12459545
rdivii 13102010
rdiviiz 13145740
mod8 13161860
mpabs_shallow 13428463
utor 13461786
affur 13461894
divii 14046622
subrs 16475588
dvdii 16543938
Fl_halve 18785574
modis 19638526
int_bit 20971781
smodis 21176060
evalvalser 21527935
hammingu 24048520
abscmpiu 33165156
abscmpui 33165289
mulri 38033765
mpexpo 38871808
absequaliu 39660636
absequalui 41409457
itos_or_0 43599694
Mod4 43775793
modsi 45225569
affui 45473822
Fl_div 46563661
stack_malloc 46627000
truedivii 47016808
umodi2n 48918962
sdivsi_rem 51429896
gc_bool 51967716
gc_ulong 52052840
affrr_fixlg 54652963
stack_malloc_align 55496898
absi_shallow 58213910
mod2 61114293
Fl_addmulmul_pre 64612148
minuu 69180465
remlll_pre 75676972
evalprecp 78667299
evalvalp 81624576
mpsqr 91014095
Fl_triple 94309326
Fl_sqr 95825110
addiu 97011831
addui 100655902
mod2BIL 103301832
fixlg 104196666
mpodd 115078885
icopyspec 117424593
togglesign_safe 125502360
real_1 129806911
subiu 131843815
subui 136816773
mpshift 153179633
dvmduBIL 165720344
shiftr 177966976
itou 178233237
addis 181528138
gc_double 184162471
vali 190376663
varncmp 217203288
gc_long 242312647
mpsub 251516064
utoineg 293938867
cgetineg 294800158
rtor 295240956
addsi 306712568
muliu 374514462
itos 462128641
shiftr_inplace 464221851
mulis 466263394
Fl_double 468663645
real_0_bit 479011578
addir 481407049
affsr 486090478
stor 486455866
mpadd 574171608
negi 636807670
itor 714792853
Fl_neg 719266402
umodsu 723925273
stoi 772548672
expu 775366750
lg2prec 799854608
mpmul 837302657
rcopy 903172528
affii 910198331
mpneg 916720671
subrr 1000127179
cgetg_copy 1480056233
cmpuu 1492606043
cgetr 1840081680
togglesign 1911965691
minss 2009286315
absi 2068296769
mpabs 2139072475
Fl_sqr_pre 2174326502
setabssign 2205797218
nbits2lg 2365851725
Fl_mul 2419828227
expi 2448570536
addrr 2876589139
remii 3004684623
adduu 3409869392
stackdummy 3642969379
Fl_mul_pre 4097838005
Fl_add 4393690252
leafcopy 4973527733
shift_right 5631195730
dvmdsBIL 7009338486
Fl_sub 7279343852
subii 7653842375
Fl_addmul_pre 7669644390
shift_left 7675192401
uutoi 8808694980
icopy 9051184139
maxss 9714500604
utoi 11899331606
addii 12402864074
evalexpo 13131538288
utoipos 14147098716
gc_const 15509348189
cgetipos 16312535261
cgetg 24549828520
cgeti 27090659036
new_chunk 93214726402
evallg 95201112760
set_avma 128974570045

Generated by: LCOV version 1.16