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

Generated by: LCOV version 1.16