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 30530-11e908049b) Lines: 605 680 89.0 %
Date: 2025-10-13 09:22:58 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4356942223
Fl_addmul_pre 7656534871
Fl_addmulmul_pre 60109325
Fl_center 4485518
Fl_div 46523793
Fl_double 474356546
Fl_ellj_pre 242635
Fl_halve 18026012
Fl_mul 2414948300
Fl_mul_pre 4086246369
Fl_neg 716544074
Fl_sqr 94873630
Fl_sqr_pre 2163231601
Fl_sub 7298663920
Fl_triple 95609512
Mod16 389733
Mod2 2479841
Mod32 311108
Mod4 44367883
Mod64 0
Mod8 2075129
abscmpiu 33157220
abscmpui 33157270
absequaliu 39662923
absequalui 41411823
absi 2060274334
absi_shallow 58213386
absr 140
absrnz_equal1 4517954
absrnz_equal2n 1291383
addii 12406771377
addir 479827177
addis 181796199
addiu 96762511
addri 1109332
addrr 2883991062
addrs 12303333
addsi 306979540
addss 25067
addui 100412296
adduu 3412392852
affectsign 0
affectsign_safe 10736077
affii 909215508
affrr_fixlg 55830251
affsi 6383343
affsr 495484944
affui 45473825
affur 13462655
ceildivuu 3847764
cgetg 24664476378
cgetg_block 393711
cgetg_copy 1479711971
cgeti 27136471693
cgetineg 295026019
cgetipos 16305044231
cgetr 1857176985
cgetr_block 43646
cmpir 9446585
cmpis 3633554
cmpiu 10120670
cmpri 282310
cmprs 40996
cmpsi 3865528
cmpsr 795896
cmpss 1427033
cmpui 10120698
cmpuu 1492991143
divii 14057408
divsi_rem 0
divss 0
divss_rem 0
dvdii 16551126
dvdiiz 0
dvdis 33912
dvdisz 0
dvdiu 576570
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7089403315
dvmdsi 0
dvmdss 0
dvmduBIL 165752618
equalis 1181679
equaliu 3018656
equalsi 1181862
equalui 3018656
evalexpo 13269713825
evallg 95502849207
evalprecp 78670343
evalvalp 81627584
evalvalser 21443044
expi 2453848887
expu 787276995
fixlg 105327782
fractor 7376017
gc_NULL 7968924
gc_bool 51991031
gc_const 15517206860
gc_double 184309717
gc_int 2574242
gc_long 241812785
gc_stoi 155886
gc_ulong 52165691
gc_utoi 468567
gc_utoipos 1153843
get_avma 0
hammingu 24045800
icopy 9058421940
icopyspec 117026401
int_bit 22276101
itor 713095519
itos 461683067
itos_or_0 43594857
itou 177092463
itou_or_0 3041671
leafcopy 4968655054
lg2prec 807413809
maxdd 3176153
maxss 9730390996
maxuu 4804829
mindd 270163
minss 2009149623
minuu 68971887
mod16 241356
mod2 61153179
mod2BIL 103362007
mod32 259
mod4 4700747
mod64 0
mod8 13272816
modis 19638526
modsi 45225532
modss 0
mpabs 2131065849
mpabs_shallow 13428463
mpadd 576190125
mpceil 0
mpcmp 2227525
mpcopy 665
mpdiv 667694
mpexpo 38854936
mpfloor 0
mpmul 839294113
mpneg 917867789
mpodd 115082754
mpround 1216541
mpshift 153176678
mpsqr 90984297
mpsub 251500238
mptrunc 49
mulis 463149587
muliu 373412895
mulri 38033028
mulrs 7181596
mulru 2765822
nbits2lg 2383014434
negi 637462806
negr 3670323
new_chunk 93454419632
rcopy 905806915
rdivii 13097946
rdiviiz 13142739
rdivis 0
rdivsi 0
rdivss 839647
real2n 1067417
real_0 1156086
real_0_bit 481182247
real_1 131247476
real_1_bit 4706066
real_m1 455
real_m2n 126
remii 3012280586
remis 0
remlll_pre 75461511
remsi 0
remss 0
rtor 300596940
sdivsi 102150
sdivsi_rem 51429859
sdivss_rem 0
set_avma 129312108098
setabssign 2197739605
shift_left 7757330893
shift_right 5669987026
shiftl 0
shiftlr 0
shiftr 181109855
shiftr_inplace 478399889
smodis 21176263
smodss 12549910
stack_calloc 110604
stack_calloc_align 3307
stack_malloc 46641419
stack_malloc_align 55489190
stackdummy 3643661960
stoi 772632778
stor 495796438
subii 7665450809
subir 3006674
subis 170994
subiu 131674750
subri 6096313
subrr 1001232229
subrs 16475284
subsi 6117352
subss 25067
subui 136368282
subuu 25067
thuemorseu 2851
togglesign 1914454265
togglesign_safe 125522124
truedivii 46783838
truedivis 266823
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 16693
udivuu_rem 2416391
ugcdiu 10082752
ugcdui 2737
umodi2n 49623504
umodsu 724205404
umodui 1296416
umuluu_le 5803235
umuluu_or_0 5529799
utoi 11897793063
utoineg 294168524
utoipos 14142270174
utor 13462552
uutoi 8809152440
uutoineg 355373
vali 190340751
varncmp 217203353
varnmax 203
varnmin 15547

Generated by: LCOV version 1.16