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

Generated by: LCOV version 1.16