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 30586-ccf601f509) Lines: 605 680 89.0 %
Date: 2025-12-26 09:21:14 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 43606
sdivsi 102151
stack_calloc 110347
gc_stoi 155887
dvdui 167195
subis 170920
Fl_ellj_pre 238031
mod16 241110
mindd 264325
truedivis 266957
cmpri 282310
Mod32 311108
uutoineg 362548
Mod16 389733
cgetg_block 407125
gc_utoi 468629
dvdiu 576267
mpdiv 665644
cmpsr 796094
rdivss 839647
real2n 1067006
addri 1105740
gc_utoipos 1153478
real_0 1156420
equalis 1181840
equalsi 1182022
mpround 1216585
absrnz_equal2n 1292731
umodui 1296276
cmpss 1379853
Mod8 2073926
mpcmp 2225713
udivuu_rem 2416412
Mod2 2479192
gc_int 2569998
mulru 2765892
subir 3005085
equalui 3018199
equaliu 3018200
itou_or_0 3041682
maxdd 3176929
cmpis 3634842
negr 3670980
cmpsi 3866837
ceildivuu 3877562
Fl_center 4486058
absrnz_equal1 4520562
real_1_bit 4704678
maxuu 4814957
mod4 4932472
umuluu_or_0 5512763
umuluu_le 5803291
subsi 6093390
subri 6129044
truedivsi 6202031
affsi 6372982
mulrs 7181596
fractor 7376757
gc_NULL 7961572
cmpir 9431928
ugcdiu 10105538
cmpiu 10116864
cmpui 10116904
affectsign_safe 10725205
uabsdiviu_rem 11892741
addrs 12305438
smodss 12511141
rdivii 13099941
rdiviiz 13145863
mod8 13162538
mpabs_shallow 13428463
utor 13461488
affur 13461608
divii 14041299
subrs 16475785
dvdii 16565660
Fl_halve 18767950
modis 19638526
int_bit 20917709
smodis 21176060
evalvalser 21527935
hammingu 24048343
abscmpiu 33066201
abscmpui 33066221
mulri 38033733
mpexpo 38875503
absequaliu 39660771
absequalui 41409692
itos_or_0 43598686
Mod4 43733527
modsi 45225461
affui 45473825
Fl_div 46474245
stack_malloc 46626936
truedivii 47019388
umodi2n 48986657
sdivsi_rem 51429788
gc_bool 51993454
gc_ulong 52038735
affrr_fixlg 54653130
stack_malloc_align 55493379
absi_shallow 58106812
mod2 61112172
Fl_addmulmul_pre 64565329
minuu 69128086
remlll_pre 75659500
evalprecp 78663891
evalvalp 81620622
mpsqr 91023681
Fl_triple 94130248
Fl_sqr 95849742
addiu 96792883
addui 100436739
mod2BIL 103150480
fixlg 104196625
mpodd 115073339
icopyspec 117080560
togglesign_safe 125612694
real_1 129812885
subiu 131486658
subui 136459350
mpshift 153139229
dvmduBIL 165678366
itou 177596673
shiftr 177970824
addis 181571344
gc_double 184156964
vali 190313152
varncmp 217206248
gc_long 242228956
mpsub 251597233
utoineg 293815282
cgetineg 294676166
rtor 295240267
addsi 306757170
muliu 371702486
itos 462123387
shiftr_inplace 463972853
mulis 464510589
Fl_double 467612284
real_0_bit 479341819
addir 480486633
affsr 486064846
stor 486379841
mpadd 574583102
negi 636839992
itor 713448901
Fl_neg 719094511
umodsu 723904266
stoi 772765061
expu 775169920
lg2prec 798354782
mpmul 837812023
rcopy 903079537
affii 910180068
mpneg 916749671
subrr 1000170802
cgetg_copy 1479958426
cmpuu 1492602301
cgetr 1838801644
togglesign 1911125944
minss 2009024013
absi 2067718674
mpabs 2138493050
Fl_sqr_pre 2169336440
setabssign 2205157011
nbits2lg 2365329830
Fl_mul 2419352222
expi 2446367248
addrr 2876727684
remii 3004487854
adduu 3412820438
stackdummy 3642273525
Fl_mul_pre 4081020132
Fl_add 4366196174
leafcopy 4972745857
shift_right 5627250708
dvmdsBIL 7004427370
Fl_sub 7269344767
subii 7655816343
Fl_addmul_pre 7657290009
shift_left 7674028550
uutoi 8807589367
icopy 9054577756
maxss 9708213851
utoi 11902085964
addii 12407715642
evalexpo 13126797622
utoipos 14143971370
gc_const 15489604340
cgetipos 16305301630
cgetg 24532218751
cgeti 27090456492
new_chunk 93182177301
evallg 95135922898
set_avma 128885851694

Generated by: LCOV version 1.16