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 30775-9d8a55740a) Lines: 605 680 89.0 %
Date: 2026-04-05 09:26:48 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 6150181608
Fl_addmul_pre 7662205009
Fl_addmulmul_pre 64641207
Fl_center 4486191
Fl_div 46741913
Fl_double 442901011
Fl_ellj_pre 238059
Fl_halve 18773849
Fl_mul 2439219512
Fl_mul_pre 4221919036
Fl_neg 729044854
Fl_sqr 99491217
Fl_sqr_pre 2338330062
Fl_sub 7408603731
Fl_triple 87298155
Mod16 389733
Mod2 2370111
Mod32 311108
Mod4 43853266
Mod64 0
Mod8 2073880
abscmpiu 33351668
abscmpui 33351729
absequaliu 39546321
absequalui 41296304
absi 2066819608
absi_shallow 57404886
absr 19040
absrnz_equal1 4553783
absrnz_equal2n 1300225
addii 12532999500
addir 483046998
addis 194705825
addiu 98769714
addri 1106191
addrr 2930911347
addrs 12360974
addsi 319884773
addss 25067
addui 102844767
adduu 3448604855
affectsign 0
affectsign_safe 10730693
affii 964250420
affrr_fixlg 56106306
affsi 6446044
affsr 501319041
affui 45491533
affur 14335217
ceildivuu 3905056
cgetg 25526083193
cgetg_block 426414
cgetg_copy 1490089664
cgeti 27479547515
cgetineg 298678859
cgetipos 16441107618
cgetr 1875846029
cgetr_block 44302
cmpir 9441957
cmpis 3634495
cmpiu 12981322
cmpri 284263
cmprs 40996
cmpsi 3866493
cmpsr 796099
cmpss 1392943
cmpui 12981512
cmpuu 1490228573
divii 14049171
divsi_rem 0
divss 0
divss_rem 0
dvdii 16905022
dvdiiz 0
dvdis 33737
dvdisz 0
dvdiu 576275
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7147689004
dvmdsi 0
dvmdss 0
dvmduBIL 165695384
equalis 1151145
equaliu 3021729
equalsi 1151327
equalui 3021729
evalexpo 13396801861
evallg 96861705372
evalprecp 78673435
evalvalp 81629839
evalvalser 24359582
expi 2424361713
expu 796840773
fixlg 105717175
fractor 7379010
gc_NULL 7962508
gc_bool 56784356
gc_const 15649694306
gc_double 184151660
gc_int 2742573
gc_long 242624408
gc_stoi 155907
gc_ulong 52097795
gc_utoi 468787
gc_utoipos 1153566
get_avma 0
hammingu 24048719
icopy 9152084363
icopyspec 117798405
int_bit 20978078
itor 716842667
itos 476313502
itos_or_0 44910964
itou 179080457
itou_or_0 3147012
leafcopy 5061355906
lg2prec 815903543
maxdd 3211477
maxss 9716041850
maxuu 6610907
mindd 264377
minss 2025887351
minuu 69634372
mod16 307017
mod2 62589213
mod2BIL 107449263
mod32 259
mod4 5140692
mod64 0
mod8 15585883
modis 19638526
modsi 45242156
modss 0
mpabs 2137740398
mpabs_shallow 13428463
mpadd 572760093
mpceil 0
mpcmp 2226351
mpcopy 665
mpdiv 665536
mpexpo 38875706
mpfloor 0
mpmul 836973953
mpneg 926467978
mpodd 116092572
mpround 1216579
mpshift 153481477
mpsqr 91029614
mpsub 251595253
mptrunc 49
mulis 467123160
muliu 373405743
mulri 38284412
mulrs 7181596
mulru 2765892
nbits2lg 2402518500
negi 640829114
negr 3682688
new_chunk 95120804609
rcopy 916759612
rdivii 13103308
rdiviiz 13147313
rdivis 0
rdivsi 0
rdivss 839647
real2n 1068599
real_0 1157703
real_0_bit 482107030
real_1 133637604
real_1_bit 4713878
real_m1 455
real_m2n 126
remii 3062231813
remis 0
remlll_pre 75682189
remsi 0
remss 0
rtor 303748328
sdivsi 102148
sdivsi_rem 51446476
sdivss_rem 0
set_avma 131343825139
setabssign 2204786054
shift_left 7796036800
shift_right 5729162052
shiftl 0
shiftlr 0
shiftr 187933074
shiftr_inplace 466847870
smodis 21176088
smodss 12551218
stack_calloc 110691
stack_calloc_align 3325
stack_malloc 46928790
stack_malloc_align 55534487
stackdummy 3685963663
stoi 798948175
stor 501668367
subii 7719694939
subir 3004955
subis 171738
subiu 133398229
subri 6098826
subrr 1006244443
subrs 16536100
subsi 6184534
subss 25067
subui 138374090
subuu 25067
thuemorseu 3313
togglesign 1953220932
togglesign_safe 157296558
truedivii 54745027
truedivis 268372
truedivsi 6202024
uabsdiviu_rem 11892741
uabsdivui_rem 16693
udivuu_rem 2418379
ugcdiu 10320422
ugcdui 2737
umodi2n 48996408
umodsu 734193902
umodui 711392
umuluu_le 7617880
umuluu_or_0 6315469
utoi 12045364015
utoineg 297818168
utoipos 14257737102
utor 14335110
uutoi 8933116421
uutoineg 362496
vali 190835971
varncmp 198759832
varnmax 203
varnmin 10374

Generated by: LCOV version 1.16