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 30587-f85873d515) Lines: 605 680 89.0 %
Date: 2025-12-29 09:21:39 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 43844
sdivsi 102150
stack_calloc 110363
gc_stoi 155881
dvdui 167195
subis 170920
Fl_ellj_pre 238079
mod16 241110
mindd 264325
truedivis 266955
cmpri 282310
Mod32 311108
uutoineg 362580
Mod16 389733
cgetg_block 407109
gc_utoi 468626
dvdiu 576269
mpdiv 665636
cmpsr 796097
rdivss 839647
real2n 1067007
addri 1105789
gc_utoipos 1153482
real_0 1156400
equalis 1181856
equalsi 1182038
mpround 1216583
absrnz_equal2n 1292749
umodui 1296276
cmpss 1379853
Mod8 2073986
mpcmp 2225705
udivuu_rem 2416412
Mod2 2479241
gc_int 2570039
mulru 2765892
subir 3005086
equaliu 3018215
equalui 3018215
itou_or_0 3041699
maxdd 3176947
cmpis 3634907
negr 3671138
cmpsi 3866907
ceildivuu 3880104
Fl_center 4486193
absrnz_equal1 4520491
real_1_bit 4704671
maxuu 4815188
mod4 4932510
umuluu_or_0 5529876
umuluu_le 5803291
subsi 6093376
subri 6122314
truedivsi 6202031
affsi 6372971
mulrs 7181596
fractor 7376764
gc_NULL 7962398
cmpir 9427828
ugcdiu 10105672
cmpiu 10117539
cmpui 10117602
affectsign_safe 10725505
uabsdiviu_rem 11892741
addrs 12305378
smodss 12561738
rdivii 13101579
rdiviiz 13146976
mod8 13161323
mpabs_shallow 13428463
utor 13461840
affur 13461949
divii 14043864
subrs 16475691
dvdii 16563328
Fl_halve 18785394
modis 19638526
int_bit 20974920
smodis 21176060
evalvalser 21527935
hammingu 24048462
abscmpiu 32519196
abscmpui 32519204
mulri 38033438
mpexpo 38872700
absequaliu 39661021
absequalui 41409945
itos_or_0 43598411
Mod4 43747995
modsi 45225533
affui 45473825
Fl_div 46484530
stack_malloc 46626999
truedivii 47022815
umodi2n 49000667
sdivsi_rem 51429860
gc_bool 51991625
gc_ulong 52062596
affrr_fixlg 54652878
stack_malloc_align 55491425
absi_shallow 57559352
mod2 61114040
Fl_addmulmul_pre 64618608
minuu 69172758
remlll_pre 75710180
evalprecp 78668472
evalvalp 81625172
mpsqr 91013919
Fl_triple 94451518
addiu 95705807
Fl_sqr 95912007
addui 99349881
mod2BIL 103155483
fixlg 104196332
mpodd 115078377
icopyspec 117081566
togglesign_safe 125616809
real_1 129805617
subiu 131489350
subui 136462006
mpshift 153126339
dvmduBIL 163319347
itou 177595713
shiftr 177975539
addis 181599645
gc_double 184167855
vali 190314894
varncmp 217206297
gc_long 242224272
mpsub 251568449
utoineg 293812223
cgetineg 294673732
rtor 295239706
addsi 306785214
muliu 372000082
itos 462124440
shiftr_inplace 463962874
mulis 464517154
Fl_double 469292721
real_0_bit 478985769
addir 480523823
affsr 486205383
stor 486472023
mpadd 574241802
negi 636872964
itor 713437596
Fl_neg 719329312
umodsu 723951938
stoi 772843517
expu 775267481
lg2prec 798412060
mpmul 837445355
rcopy 903180330
affii 910370259
mpneg 916783406
subrr 1000160422
cgetg_copy 1479987648
cmpuu 1492615185
cgetr 1838914970
togglesign 1911240517
minss 2008941173
absi 2067761820
mpabs 2138524652
Fl_sqr_pre 2175753486
setabssign 2205199340
nbits2lg 2365435811
Fl_mul 2419296410
expi 2446840530
addrr 2876790604
remii 3006290239
adduu 3412387912
stackdummy 3638795717
Fl_mul_pre 4099805443
Fl_add 4402993088
leafcopy 4972205423
shift_right 5628281180
dvmdsBIL 7005947478
Fl_sub 7269959457
subii 7656553462
Fl_addmul_pre 7665240656
shift_left 7674328603
uutoi 8816216136
icopy 9055841862
maxss 9705352252
utoi 11908450077
addii 12412389014
evalexpo 13130904158
utoipos 14150550921
gc_const 15491750448
cgetipos 16313162693
cgetg 24533871562
cgeti 27105690778
new_chunk 93209825298
evallg 95163589424
set_avma 128924150184

Generated by: LCOV version 1.16