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 30480-572da319a6) Lines: 605 680 89.0 %
Date: 2025-08-26 09:23: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 4355906875
Fl_addmul_pre 7647153191
Fl_addmulmul_pre 60071509
Fl_center 4485591
Fl_div 46489779
Fl_double 473618780
Fl_ellj_pre 242628
Fl_halve 18027350
Fl_mul 2413793012
Fl_mul_pre 4081151412
Fl_neg 716414168
Fl_sqr 94848472
Fl_sqr_pre 2163686317
Fl_sub 7279448296
Fl_triple 95456461
Mod16 389733
Mod2 2479841
Mod32 311108
Mod4 44345547
Mod64 0
Mod8 2070208
abscmpiu 32412030
abscmpui 32412181
absequaliu 39649963
absequalui 41398863
absi 2060417622
absi_shallow 57463171
absr 140
absrnz_equal1 4515810
absrnz_equal2n 1288744
addii 12406970398
addir 479715518
addis 181687393
addiu 95203307
addri 1109293
addrr 2881262252
addrs 12304832
addsi 306869494
addss 25067
addui 98852623
adduu 3410588002
affectsign 0
affectsign_safe 10737338
affii 909040801
affrr_fixlg 55796261
affsi 6383156
affsr 495309304
affui 45473825
affur 13460222
ceildivuu 3847585
cgetg 24652273574
cgetg_block 393642
cgetg_copy 1479678460
cgeti 27124216965
cgetineg 295058923
cgetipos 16313344695
cgetr 1856830632
cgetr_block 43545
cmpir 9426066
cmpis 3633563
cmpiu 10115219
cmpri 282310
cmprs 40996
cmpsi 3865535
cmpsr 795892
cmpss 1427033
cmpui 10115022
cmpuu 1492925804
divii 14057035
divsi_rem 0
divss 0
divss_rem 0
dvdii 16480701
dvdiiz 0
dvdis 33912
dvdisz 0
dvdiu 576569
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7089282564
dvmdsi 0
dvmdss 0
dvmduBIL 165800812
equalis 1181513
equaliu 2995656
equalsi 1181695
equalui 2995656
evalexpo 13257784862
evallg 95436820593
evalprecp 78666696
evalvalp 81623199
evalvalser 21443044
expi 2454124288
expu 786981361
fixlg 105292061
fractor 7376309
gc_NULL 7969074
gc_bool 51914710
gc_const 15511945165
gc_double 184417559
gc_int 2574319
gc_long 241795064
gc_stoi 155884
gc_ulong 52153070
gc_utoi 468674
gc_utoipos 1153912
get_avma 0
hammingu 24045882
icopy 9055880840
icopyspec 117009031
int_bit 22229161
itor 713073825
itos 461691542
itos_or_0 43581083
itou 177063792
itou_or_0 3054268
leafcopy 4968913279
lg2prec 807100883
maxdd 3163696
maxss 9715211374
maxuu 4804990
mindd 270151
minss 2009240933
minuu 69160278
mod16 236594
mod2 61148358
mod2BIL 103331948
mod32 259
mod4 4700806
mod64 0
mod8 13270531
modis 19638518
modsi 45225491
modss 0
mpabs 2131651587
mpabs_shallow 13428463
mpadd 573985194
mpceil 0
mpcmp 2227468
mpcopy 665
mpdiv 667721
mpexpo 38853071
mpfloor 0
mpmul 837002242
mpneg 917792987
mpodd 115079137
mpround 1216543
mpshift 153216221
mpsqr 90961710
mpsub 251454214
mptrunc 49
mulis 463144911
muliu 372392127
mulri 38034321
mulrs 7181596
mulru 2765822
nbits2lg 2380842677
negi 637391064
negr 3670048
new_chunk 93425306119
rcopy 905570348
rdivii 13099646
rdiviiz 13143425
rdivis 0
rdivsi 0
rdivss 839647
real2n 1067413
real_0 1156024
real_0_bit 478199474
real_1 131212227
real_1_bit 4705737
real_m1 455
real_m2n 126
remii 3010589091
remis 0
remlll_pre 75491623
remsi 0
remss 0
rtor 300457777
sdivsi 102148
sdivsi_rem 51429807
sdivss_rem 0
set_avma 129258853985
setabssign 2198315427
shift_left 7753479101
shift_right 5671406341
shiftl 0
shiftlr 0
shiftr 180842384
shiftr_inplace 478395860
smodis 21176255
smodss 12481054
stack_calloc 110147
stack_calloc_align 3307
stack_malloc 46631143
stack_malloc_align 55485410
stackdummy 3641192287
stoi 772978571
stor 495627150
subii 7663870642
subir 3006693
subis 170994
subiu 131649125
subri 6115341
subrr 1000941540
subrs 16476432
subsi 6112177
subss 25067
subui 136342869
subuu 25067
thuemorseu 2851
togglesign 1914450528
togglesign_safe 125495785
truedivii 46790969
truedivis 266824
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 16693
udivuu_rem 2416391
ugcdiu 10085327
ugcdui 2737
umodi2n 49596664
umodsu 724174800
umodui 1296416
umuluu_le 5800680
umuluu_or_0 5508910
utoi 11898669218
utoineg 294201330
utoipos 14146320012
utor 13460102
uutoi 8807184909
uutoineg 355583
vali 190293502
varncmp 217201504
varnmax 203
varnmin 15547

Generated by: LCOV version 1.16