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 30552-d1d0643eee) Lines: 605 680 89.0 %
Date: 2025-11-22 09:22:46 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 43873
sdivsi 102149
stack_calloc 110564
gc_stoi 155880
dvdui 167195
subis 170994
mod16 241355
Fl_ellj_pre 242623
truedivis 266823
mindd 270162
cmpri 282310
Mod32 311108
uutoineg 355650
Mod16 389733
cgetg_block 408351
gc_utoi 468592
dvdiu 576569
mpdiv 667720
cmpsr 796104
rdivss 839647
real2n 1067409
addri 1109359
gc_utoipos 1153868
real_0 1156761
equalis 1181681
equalsi 1181863
mpround 1216544
absrnz_equal2n 1292552
umodui 1296416
cmpss 1427033
Mod8 2073775
mpcmp 2227505
udivuu_rem 2416419
Mod2 2479187
gc_int 2574319
mulru 2765892
subir 3006693
equaliu 3018574
equalui 3018574
itou_or_0 3041669
maxdd 3182819
cmpis 3634923
negr 3670807
ceildivuu 3846789
cmpsi 3866921
Fl_center 4486449
absrnz_equal1 4519556
real_1_bit 4706397
maxuu 4815199
mod4 4932276
umuluu_or_0 5495507
umuluu_le 5803291
subsi 6117328
subri 6128831
truedivsi 6202031
affsi 6383414
mulrs 7181596
fractor 7376742
gc_NULL 7970297
cmpir 9430041
ugcdiu 10077436
cmpiu 10119301
cmpui 10119326
affectsign_safe 10737020
uabsdiviu_rem 11892741
addrs 12305003
smodss 12512065
rdivii 13100151
rdiviiz 13146144
mod8 13270237
mpabs_shallow 13428463
utor 13463352
affur 13463460
divii 14059485
subrs 16476777
dvdii 16558564
Fl_halve 18020246
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22331709
hammingu 24048601
abscmpui 33799057
abscmpiu 33799193
mulri 38033837
mpexpo 38858229
absequaliu 39660270
absequalui 41409191
itos_or_0 43597047
Mod4 43774988
modsi 45225568
affui 45473825
Fl_div 46512377
stack_malloc 46643824
truedivii 46807037
umodi2n 49027000
sdivsi_rem 51429909
gc_bool 52000088
gc_ulong 52159934
affrr_fixlg 54649245
stack_malloc_align 55491432
absi_shallow 58855900
Fl_addmulmul_pre 60051798
mod2 61153284
minuu 69077679
remlll_pre 75526764
evalprecp 78666959
evalvalp 81623866
mpsqr 90978144
Fl_sqr 94876130
Fl_triple 95175206
addiu 98284505
addui 101934301
mod2BIL 103589522
fixlg 104147181
mpodd 115086172
icopyspec 117029962
togglesign_safe 125514234
real_1 129805053
subiu 131685556
subui 136670533
mpshift 153171663
dvmduBIL 165676357
itou 177093254
shiftr 177977706
addis 181580864
gc_double 184352373
vali 190346406
varncmp 217213043
gc_long 242070585
mpsub 251489703
utoineg 294174253
cgetineg 295031770
rtor 295276329
addsi 306764425
muliu 373598155
itos 462060136
mulis 463142516
shiftr_inplace 463734922
Fl_double 468963745
real_0_bit 479041519
addir 479887392
affsr 486039630
stor 486339162
mpadd 574263286
negi 636697136
itor 713162842
Fl_neg 716737029
umodsu 724149825
stoi 772579356
expu 775316576
lg2prec 797922492
mpmul 837325879
rcopy 902753725
affii 909232628
mpneg 916640103
subrr 1000094337
cgetg_copy 1479812485
cmpuu 1492631066
cgetr 1838484645
togglesign 1910989969
minss 2008367410
absi 2060492748
mpabs 2131284749
Fl_sqr_pre 2153319298
setabssign 2197974490
nbits2lg 2363166373
Fl_mul 2417903784
expi 2453168156
addrr 2875619852
remii 3012926711
adduu 3413770840
stackdummy 3648904703
Fl_mul_pre 4087941868
Fl_add 4380938508
leafcopy 4964822706
shift_right 5625249384
dvmdsBIL 7013410006
Fl_sub 7310873422
subii 7664682513
shift_left 7682576713
Fl_addmul_pre 7685017727
uutoi 8810798781
icopy 9055068969
maxss 9750138971
utoi 11904349198
addii 12406944826
evalexpo 13123309867
utoipos 14148414899
gc_const 15514535784
cgetipos 16307921387
cgetg 24542549324
cgeti 27134342368
new_chunk 93250989185
evallg 95235010180
set_avma 128988118069

Generated by: LCOV version 1.16