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 30536-6f6fcf9613) Lines: 605 680 89.0 %
Date: 2025-11-03 09:21:41 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4356109668
Fl_addmul_pre 7655389005
Fl_addmulmul_pre 60102611
Fl_center 4485592
Fl_div 46549337
Fl_double 474382998
Fl_ellj_pre 242626
Fl_halve 18027947
Fl_mul 2414702796
Fl_mul_pre 4083416745
Fl_neg 716485943
Fl_sqr 94870857
Fl_sqr_pre 2162303287
Fl_sub 7298817883
Fl_triple 95662543
Mod16 389733
Mod2 2479841
Mod32 311108
Mod4 43779493
Mod64 0
Mod8 2075129
abscmpiu 33114635
abscmpui 33114700
absequaliu 39663135
absequalui 41412035
absi 2060253589
absi_shallow 58171092
absr 140
absrnz_equal1 4518161
absrnz_equal2n 1291327
addii 12406011212
addir 479814639
addis 181557468
addiu 96667037
addri 1109352
addrr 2877295380
addrs 12303353
addsi 306739025
addss 25067
addui 100316824
adduu 3412156963
affectsign 0
affectsign_safe 10736994
affii 909387580
affrr_fixlg 54637347
affsi 6383408
affsr 485933568
affui 45473825
affur 13462429
ceildivuu 3846428
cgetg 24536115630
cgetg_block 393708
cgetg_copy 1479723458
cgeti 27130324091
cgetineg 295018970
cgetipos 16303946939
cgetr 1837997325
cgetr_block 43645
cmpir 9442224
cmpis 3633606
cmpiu 10120857
cmpri 282310
cmprs 40996
cmpsi 3865576
cmpsr 795889
cmpss 1427033
cmpui 10120883
cmpuu 1492980266
divii 14053361
divsi_rem 0
divss 0
divss_rem 0
dvdii 16547985
dvdiiz 0
dvdis 33912
dvdisz 0
dvdiu 576573
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7012303595
dvmdsi 0
dvmdss 0
dvmduBIL 165765357
equalis 1181598
equaliu 3018651
equalsi 1181780
equalui 3018652
evalexpo 13126387875
evallg 95229836132
evalprecp 78668620
evalvalp 81625837
evalvalser 21443044
expi 2452961674
expu 775148821
fixlg 104135063
fractor 7376021
gc_NULL 7969427
gc_bool 51987346
gc_const 15513252436
gc_double 184335485
gc_int 2574268
gc_long 241811714
gc_stoi 155882
gc_ulong 52148660
gc_utoi 468628
gc_utoipos 1153881
get_avma 0
hammingu 24045826
icopy 9055816477
icopyspec 117026625
int_bit 22284991
itor 713052750
itos 461671134
itos_or_0 43594493
itou 177092358
itou_or_0 3041663
leafcopy 4964081789
lg2prec 797849228
maxdd 3176173
maxss 9729706274
maxuu 4804717
mindd 270161
minss 2008190566
minuu 69031254
mod16 241354
mod2 61153626
mod2BIL 103362926
mod32 259
mod4 4700746
mod64 0
mod8 13272674
modis 19638526
modsi 45225535
modss 0
mpabs 2131041778
mpabs_shallow 13428463
mpadd 575873755
mpceil 0
mpcmp 2227522
mpcopy 665
mpdiv 667712
mpexpo 38853313
mpfloor 0
mpmul 838946460
mpneg 916645704
mpodd 115083276
mpround 1216549
mpshift 153186013
mpsqr 90976272
mpsub 251463962
mptrunc 49
mulis 463139406
muliu 373414966
mulri 38033058
mulrs 7181596
mulru 2765822
nbits2lg 2363377706
negi 636734478
negr 3668486
new_chunk 93237715661
rcopy 902555440
rdivii 13098199
rdiviiz 13142524
rdivis 0
rdivsi 0
rdivss 839647
real2n 1067418
real_0 1156141
real_0_bit 480886974
real_1 129741209
real_1_bit 4706136
real_m1 455
real_m2n 126
remii 3012143894
remis 0
remlll_pre 75480426
remsi 0
remss 0
rtor 295210159
sdivsi 102147
sdivsi_rem 51429864
sdivss_rem 0
set_avma 128984476738
setabssign 2197717858
shift_left 7680884634
shift_right 5624059113
shiftl 0
shiftlr 0
shiftr 177919765
shiftr_inplace 463716397
smodis 21176263
smodss 12536857
stack_calloc 110580
stack_calloc_align 3307
stack_malloc 46641439
stack_malloc_align 55486882
stackdummy 3643808846
stoi 772525234
stor 486254497
subii 7664271077
subir 3006698
subis 170993
subiu 131675633
subri 6086165
subrr 1000037386
subrs 16475333
subsi 6117434
subss 25067
subui 136369226
subuu 25067
thuemorseu 2851
togglesign 1911013986
togglesign_safe 125524922
truedivii 46775762
truedivis 266829
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 16693
udivuu_rem 2416391
ugcdiu 10080863
ugcdui 2737
umodi2n 49035091
umodsu 724160919
umodui 1296416
umuluu_le 5803235
umuluu_or_0 5531781
utoi 11898826849
utoineg 294161732
utoipos 14143369239
utor 13462338
uutoi 8809543196
uutoineg 355151
vali 190340774
varncmp 217203881
varnmax 203
varnmin 15547

Generated by: LCOV version 1.16