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 30523-b8de812414) Lines: 605 680 89.0 %
Date: 2025-10-08 09:22:32 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 33912
cmprs 40996
cgetr_block 43651
sdivsi 102151
stack_calloc 110598
gc_stoi 155890
dvdui 167195
subis 170995
mod16 241355
Fl_ellj_pre 242636
truedivis 266807
mindd 270162
cmpri 282310
Mod32 311108
uutoineg 355547
Mod16 389733
cgetg_block 393707
gc_utoi 468627
dvdiu 576568
mpdiv 667720
cmpsr 795893
rdivss 839647
real2n 1067594
addri 1109241
gc_utoipos 1153842
real_0 1156109
equalis 1181633
equalsi 1181815
mpround 1216545
absrnz_equal2n 1291399
umodui 1296415
cmpss 1427033
Mod8 2075129
mpcmp 2227480
udivuu_rem 2416391
Mod2 2479841
gc_int 2574269
mulru 2765822
subir 3006687
equaliu 3018660
equalui 3018660
itou_or_0 3041667
maxdd 3176713
cmpis 3633541
negr 3670244
ceildivuu 3850636
cmpsi 3865513
Fl_center 4485404
absrnz_equal1 4518073
mod4 4700745
real_1_bit 4706007
maxuu 4804859
umuluu_or_0 5533296
umuluu_le 5803249
subsi 6117315
subri 6126262
truedivsi 6202031
affsi 6383310
mulrs 7181596
fractor 7376709
gc_NULL 7969237
cmpir 9425470
ugcdiu 10082610
cmpiu 10118701
cmpui 10118721
affectsign_safe 10736790
uabsdiviu_rem 11892741
addrs 12303276
smodss 12550857
rdivii 13100509
rdiviiz 13145030
mod8 13270600
mpabs_shallow 13428463
utor 13462523
affur 13462635
divii 14061021
subrs 16475138
dvdii 16553497
Fl_halve 18034574
modis 19638526
smodis 21176263
evalvalser 21443044
int_bit 22294143
hammingu 24045821
abscmpiu 33399354
abscmpui 33399387
mulri 38034250
mpexpo 38854745
absequaliu 39662932
absequalui 41411833
itos_or_0 43595026
Mod4 44369976
modsi 45225545
affui 45473825
Fl_div 46531242
stack_malloc 46641370
truedivii 46794234
umodi2n 49625886
sdivsi_rem 51429873
gc_bool 51994261
gc_ulong 52194380
stack_malloc_align 55488623
affrr_fixlg 55831347
absi_shallow 58455412
Fl_addmulmul_pre 60109676
mod2 61152967
minuu 69060155
remlll_pre 75515132
evalprecp 78669170
evalvalp 81626347
mpsqr 90970982
Fl_sqr 94896001
Fl_triple 95793634
addiu 97245138
addui 100894953
mod2BIL 103357718
fixlg 105328951
mpodd 115083131
icopyspec 117026877
togglesign_safe 125523287
real_1 131269871
subiu 131676366
subui 136370032
mpshift 153192373
dvmduBIL 165723003
itou 177092378
shiftr 181109490
addis 181786071
gc_double 184346744
vali 190341300
varncmp 217203726
gc_long 241811964
mpsub 251509002
utoineg 294165605
cgetineg 295023111
rtor 300590933
addsi 306970217
muliu 373494875
itos 461701033
mulis 463150953
Fl_double 474786137
shiftr_inplace 478414806
real_0_bit 478741464
addir 479848313
affsr 495516904
stor 495811632
mpadd 574013810
negi 637431533
itor 713137031
Fl_neg 716571474
umodsu 724239989
stoi 772798632
expu 787290038
lg2prec 807434024
mpmul 837125935
rcopy 905997005
affii 909267269
mpneg 917848180
subrr 1001234932
cgetg_copy 1479711133
cmpuu 1492984523
cgetr 1857285480
togglesign 1914450461
minss 2009341503
absi 2060350434
mpabs 2131557555
Fl_sqr_pre 2164131156
setabssign 2198237150
nbits2lg 2381358867
Fl_mul 2415843576
expi 2453896523
addrr 2882089294
remii 3012649033
adduu 3413081543
stackdummy 3645651488
Fl_mul_pre 4092234205
Fl_add 4357248770
leafcopy 4969390314
shift_right 5670756284
dvmdsBIL 7090298691
Fl_sub 7310562447
Fl_addmul_pre 7658748797
subii 7665244813
shift_left 7757478489
uutoi 8811344998
icopy 9058136179
maxss 9741984520
utoi 11901083428
addii 12407953818
evalexpo 13269302653
utoipos 14145450640
gc_const 15518231201
cgetipos 16308431970
cgetg 24664849391
cgeti 27141463332
new_chunk 93462527043
evallg 95510093778
set_avma 129330285363

Generated by: LCOV version 1.16