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 30365-beea1ff998) Lines: 605 680 89.0 %
Date: 2025-07-01 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
Fl_add 4348503852
Fl_addmul_pre 7615437383
Fl_addmulmul_pre 59614702
Fl_center 4030060
Fl_div 46544014
Fl_double 475987884
Fl_ellj_pre 242779
Fl_halve 18046531
Fl_mul 2386134137
Fl_mul_pre 4033077585
Fl_neg 711751103
Fl_sqr 94863829
Fl_sqr_pre 2158649860
Fl_sub 7303949873
Fl_triple 96386280
Mod16 277481
Mod2 2024379
Mod32 199255
Mod4 44346210
Mod64 0
Mod8 2070299
abscmpiu 32381685
abscmpui 32381620
absequaliu 39650018
absequalui 41398917
absi 2065991517
absi_shallow 58936104
absr 140
absrnz_equal1 4515451
absrnz_equal2n 1288886
addii 12374091121
addir 478837625
addis 181281186
addiu 97671603
addri 1109330
addrr 2878705576
addrs 12354054
addsi 306463404
addss 25067
addui 101175848
adduu 3412690047
affectsign 0
affectsign_safe 10737311
affii 908912402
affrr_fixlg 55887760
affsi 6396450
affsr 495686412
affui 45473650
affur 13453554
ceildivuu 3844764
cgetg 24540990147
cgetg_block 393407
cgetg_copy 1470999697
cgeti 27247228469
cgetineg 268213764
cgetipos 16418266617
cgetr 1856935512
cgetr_block 43477
cmpir 9438845
cmpis 3633470
cmpiu 9658854
cmpri 282261
cmprs 40996
cmpsi 3865420
cmpsr 824661
cmpss 1432792
cmpui 9658782
cmpuu 1440503337
divii 14054438
divsi_rem 0
divss 0
divss_rem 0
dvdii 16489324
dvdiiz 0
dvdis 33912
dvdisz 0
dvdiu 576572
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7073824932
dvmdsi 0
dvmdss 0
dvmduBIL 165590221
equalis 1174419
equaliu 2995228
equalsi 1174602
equalui 2995229
evalexpo 13256345191
evallg 95419932889
evalprecp 78670097
evalvalp 81626772
evalvalser 21443016
expi 2455544906
expu 784191109
fixlg 103885680
fractor 7375270
gc_NULL 7975680
gc_bool 51931535
gc_const 15505745654
gc_double 182162779
gc_int 2574161
gc_long 239247050
gc_stoi 155882
gc_ulong 37187369
gc_utoi 468579
gc_utoipos 1153919
get_avma 0
hammingu 24045245
icopy 9095313732
icopyspec 116491057
int_bit 22285146
itor 712495301
itos 458993633
itos_or_0 24090039
itou 176159065
itou_or_0 2996108
leafcopy 4965333461
lg2prec 806931974
maxdd 3162838
maxss 9602012663
maxuu 4805044
mindd 268637
minss 2011694963
minuu 68067059
mod16 236580
mod2 61083566
mod2BIL 102144364
mod32 259
mod4 4684308
mod64 0
mod8 13199435
modis 19602559
modsi 45223245
modss 0
mpabs 2137226765
mpabs_shallow 13428463
mpadd 575566189
mpceil 0
mpcmp 2227507
mpcopy 708
mpdiv 667714
mpexpo 38840661
mpfloor 0
mpmul 838520926
mpneg 921977111
mpodd 114973348
mpround 1216553
mpshift 153184883
mpsqr 90936945
mpsub 251399627
mptrunc 49
mulis 464044659
muliu 372459364
mulri 38041347
mulrs 7181596
mulru 2765822
nbits2lg 2382511830
negi 641578134
negr 3692538
new_chunk 93447278241
rcopy 904094696
rdivii 13097450
rdiviiz 13140504
rdivis 0
rdivsi 0
rdivss 839647
real2n 1061003
real_0 1155991
real_0_bit 480412891
real_1 131550710
real_1_bit 4700810
real_m1 455
real_m2n 126
remii 3013497058
remis 0
remlll_pre 75425153
remsi 0
remss 0
rtor 300386516
sdivsi 102148
sdivsi_rem 51427572
sdivss_rem 0
set_avma 129102547053
setabssign 2203547601
shift_left 7745758517
shift_right 5661356945
shiftl 0
shiftlr 0
shiftr 180377172
shiftr_inplace 478375314
smodis 21140226
smodss 12504011
stack_calloc 110045
stack_calloc_align 3300
stack_malloc 46484968
stack_malloc_align 55472026
stackdummy 3633278731
stoi 745335420
stor 495975370
subii 7650557582
subir 3006050
subis 170992
subiu 130237548
subri 6084974
subrr 1000041512
subrs 16512737
subsi 6105002
subss 25067
subui 134476575
subuu 25067
thuemorseu 2851
togglesign 1926931836
togglesign_safe 125059152
truedivii 46751812
truedivis 266815
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 19089
udivuu_rem 159818229
ugcdiu 9987134
ugcdui 2737
umodi2n 48917838
umodsu 724065003
umodui 1296416
umuluu_le 5800680
umuluu_or_0 5545035
utoi 11879175909
utoineg 267356442
utoipos 14236299028
utor 13453456
uutoi 8818556113
uutoineg 355159
vali 187917462
varncmp 217197630
varnmax 203
varnmin 15547

Generated by: LCOV version 1.16