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

Generated by: LCOV version 1.16