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 30793-1ceee7ca5f) Lines: 605 680 89.0 %
Date: 2026-04-10 09:27:03 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
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 3313
stack_calloc_align 3325
varnmin 10374
uabsdivui_rem 16693
absr 19040
addss 25067
subss 25067
subuu 25067
dvdis 33737
cmprs 40996
cgetr_block 44245
sdivsi 102150
stack_calloc 110647
gc_stoi 155904
dvdui 167195
subis 171739
Fl_ellj_pre 238067
mindd 264378
truedivis 268350
cmpri 284263
mod16 307018
Mod32 311108
uutoineg 362794
Mod16 389733
cgetg_block 426423
gc_utoi 468685
dvdiu 576272
mpdiv 665513
umodui 711392
cmpsr 796106
rdivss 839647
real2n 1068595
addri 1106233
equalis 1151252
equalsi 1151434
gc_utoipos 1153608
real_0 1157732
mpround 1216581
absrnz_equal2n 1300273
cmpss 1392943
Mod8 2073890
mpcmp 2226389
Mod2 2370266
udivuu_rem 2418379
gc_int 2739166
mulru 2765892
subir 3004958
equaliu 3021736
equalui 3021737
itou_or_0 3147020
maxdd 3211732
cmpis 3634514
negr 3682461
cmpsi 3866512
ceildivuu 3901452
Fl_center 4486147
absrnz_equal1 4553911
real_1_bit 4713937
mod4 5140839
subri 6102693
subsi 6184732
truedivsi 6202087
umuluu_or_0 6262106
affsi 6446117
maxuu 6610892
mulrs 7181596
fractor 7379017
umuluu_le 7617880
gc_NULL 7961620
cmpir 9449474
ugcdiu 10319737
affectsign_safe 10730211
uabsdiviu_rem 11892741
addrs 12361134
smodss 12433758
cmpui 12980240
cmpiu 12980319
rdivii 13105760
rdiviiz 13150148
mpabs_shallow 13428463
divii 14053330
utor 14335057
affur 14335162
mod8 15586163
subrs 16536456
dvdii 16892904
Fl_halve 18760588
modis 19638526
int_bit 20945906
smodis 21176088
hammingu 24048798
evalvalser 24359582
abscmpiu 33770491
abscmpui 33770634
mulri 38284696
mpexpo 38881890
absequaliu 39546316
absequalui 41296245
Mod4 43848161
itos_or_0 44911760
modsi 45242159
affui 45491532
Fl_div 46789378
stack_malloc 46929145
umodi2n 48991208
sdivsi_rem 51446543
gc_ulong 52056619
truedivii 54759589
stack_malloc_align 55542801
affrr_fixlg 56109665
gc_bool 56771006
absi_shallow 57824223
mod2 62590115
Fl_addmulmul_pre 64654071
minuu 69593069
remlll_pre 75695645
evalprecp 78672926
evalvalp 81630306
Fl_triple 87223024
mpsqr 91046884
Fl_sqr 99463242
addiu 99600174
addui 103675207
fixlg 105720633
mod2BIL 107445119
mpodd 116093766
icopyspec 117798137
subiu 133392839
real_1 133647162
subui 138368834
mpshift 153495420
togglesign_safe 157303677
dvmduBIL 165767962
itou 179081090
gc_double 184174574
shiftr 187937940
vali 190834792
addis 194662461
varncmp 198768889
gc_long 242628920
mpsub 251626792
utoineg 297823460
cgetineg 298684251
rtor 303765948
addsi 319848492
muliu 373310699
Fl_double 442589718
mulis 467112634
shiftr_inplace 467146240
itos 476336634
real_0_bit 482506454
addir 483067096
affsr 501309424
stor 501711103
mpadd 573138788
negi 640807088
itor 716770677
Fl_neg 729202784
umodsu 734114517
expu 796908434
stoi 798864347
lg2prec 815814653
mpmul 837324598
rcopy 916814901
mpneg 926457009
affii 964515851
subrr 1006352315
cgetg_copy 1490186627
cmpuu 1490423204
cgetr 1875924728
togglesign 1953464290
minss 2026067518
absi 2067023205
mpabs 2137982282
setabssign 2205036350
Fl_sqr_pre 2335904121
nbits2lg 2403371530
expi 2424809563
Fl_mul 2440150496
addrr 2931805236
remii 3061013090
adduu 3449569433
stackdummy 3690317126
Fl_mul_pre 4222491592
leafcopy 5061721982
shift_right 5732834344
Fl_add 6142414124
dvmdsBIL 7150144303
Fl_sub 7409403561
Fl_addmul_pre 7655835900
subii 7718314557
shift_left 7795417061
uutoi 8934039661
icopy 9150181541
maxss 9718136664
utoi 12051743231
addii 12531564126
evalexpo 13388854726
utoipos 14269211227
gc_const 15647771585
cgetipos 16460082461
cgetg 25539057416
cgeti 27473790195
new_chunk 95131940860
evallg 96864493766
set_avma 131352818884

Generated by: LCOV version 1.16