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 30504-e6f76a2795) Lines: 605 680 89.0 %
Date: 2025-09-29 09:23:05 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4356196436
Fl_addmul_pre 7644399942
Fl_addmulmul_pre 60041538
Fl_center 4485590
Fl_div 46433849
Fl_double 474212268
Fl_ellj_pre 242632
Fl_halve 18045665
Fl_mul 2411780035
Fl_mul_pre 4081451301
Fl_neg 716256827
Fl_sqr 94852546
Fl_sqr_pre 2166222781
Fl_sub 7281955668
Fl_triple 95571363
Mod16 389733
Mod2 2479841
Mod32 311108
Mod4 44366963
Mod64 0
Mod8 2075129
abscmpiu 31943838
abscmpui 31943677
absequaliu 39663077
absequalui 41411980
absi 2060309681
absi_shallow 56999997
absr 140
absrnz_equal1 4518006
absrnz_equal2n 1291426
addii 12406587329
addir 479835438
addis 181770283
addiu 94324310
addri 1109334
addrr 2881761385
addrs 12303276
addsi 306951901
addss 25067
addui 97974083
adduu 3409932370
affectsign 0
affectsign_safe 10736819
affii 909193749
affrr_fixlg 55829684
affsi 6383150
affsr 495555566
affui 45473825
affur 13462530
ceildivuu 3849950
cgetg 24645162626
cgetg_block 393699
cgetg_copy 1479709172
cgeti 27135520828
cgetineg 295020780
cgetipos 16301339020
cgetr 1857312474
cgetr_block 43649
cmpir 9427448
cmpis 3633603
cmpiu 10119667
cmpri 282310
cmprs 40996
cmpsi 3865576
cmpsr 795884
cmpss 1427033
cmpui 10119711
cmpuu 1492978273
divii 14053144
divsi_rem 0
divss 0
divss_rem 0
dvdii 16554718
dvdiiz 0
dvdis 33912
dvdisz 0
dvdiu 576563
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7090122040
dvmdsi 0
dvmdss 0
dvmduBIL 165587367
equalis 1181673
equaliu 3018675
equalsi 1181855
equalui 3018675
evalexpo 13267249647
evallg 95461528242
evalprecp 78665536
evalvalp 81622164
evalvalser 21443044
expi 2453732583
expu 787291171
fixlg 105326604
fractor 7376354
gc_NULL 7969663
gc_bool 51996353
gc_const 15517418417
gc_double 184392257
gc_int 2574276
gc_long 241813624
gc_stoi 155880
gc_ulong 52167341
gc_utoi 468625
gc_utoipos 1153830
get_avma 0
hammingu 24045784
icopy 9057922378
icopyspec 117026270
int_bit 22297681
itor 713138331
itos 461705497
itos_or_0 43595211
itou 177092197
itou_or_0 3041670
leafcopy 4969299778
lg2prec 807424879
maxdd 3176608
maxss 9715545020
maxuu 4805166
mindd 270159
minss 2009306208
minuu 68673623
mod16 241356
mod2 61153292
mod2BIL 103358821
mod32 259
mod4 4700746
mod64 0
mod8 13270524
modis 19638526
modsi 45225524
modss 0
mpabs 2131525955
mpabs_shallow 13428463
mpadd 574178810
mpceil 0
mpcmp 2227508
mpcopy 665
mpdiv 667717
mpexpo 38853488
mpfloor 0
mpmul 837239213
mpneg 917794698
mpodd 115082595
mpround 1216547
mpshift 153222209
mpsqr 90967511
mpsub 251465139
mptrunc 49
mulis 463151028
muliu 373488763
mulri 38034088
mulrs 7181596
mulru 2765822
nbits2lg 2381106674
negi 637377665
negr 3670144
new_chunk 93438780693
rcopy 905995779
rdivii 13099052
rdiviiz 13142221
rdivis 0
rdivsi 0
rdivss 839647
real2n 1067507
real_0 1155995
real_0_bit 478955865
real_1 131264686
real_1_bit 4705729
real_m1 455
real_m2n 126
remii 3012340731
remis 0
remlll_pre 75537337
remsi 0
remss 0
rtor 300580354
sdivsi 102150
sdivsi_rem 51429851
sdivss_rem 0
set_avma 129283729516
setabssign 2198205217
shift_left 7757162515
shift_right 5670432326
shiftl 0
shiftlr 0
shiftr 181107645
shiftr_inplace 478296477
smodis 21176263
smodss 12476928
stack_calloc 110594
stack_calloc_align 3307
stack_malloc 46641218
stack_malloc_align 55487216
stackdummy 3636900119
stoi 772032625
stor 495842591
subii 7665518442
subir 3006695
subis 170994
subiu 131675378
subri 6121299
subrr 1001172070
subrs 16474870
subsi 6117429
subss 25067
subui 136369099
subuu 25067
thuemorseu 2851
togglesign 1914328813
togglesign_safe 125511747
truedivii 46797294
truedivis 266798
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 16693
udivuu_rem 2416391
ugcdiu 10082648
ugcdui 2737
umodi2n 49623039
umodsu 724207238
umodui 1296416
umuluu_le 5803249
umuluu_or_0 5517142
utoi 11894274333
utoineg 294163195
utoipos 14138456101
utor 13462419
uutoi 8807573142
uutoineg 355429
vali 190338699
varncmp 217203126
varnmax 203
varnmin 15547

Generated by: LCOV version 1.16