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 30851-7844d7b3a5) Lines: 605 680 89.0 %
Date: 2026-05-02 09:26:58 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
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 3313
stack_calloc_align 3325
varnmin 10374
uabsdivui_rem 16693
absr 20510
addss 25067
subss 25067
subuu 25067
dvdis 33751
cmprs 40996
cgetr_block 44300
sdivsi 102151
stack_calloc 110672
gc_stoi 155897
dvdui 167195
subis 171740
Fl_ellj_pre 238052
mindd 264381
truedivis 268376
cmpri 303003
mod16 307030
Mod32 311108
uutoineg 362590
Mod16 389733
mpdiv 395507
cgetg_block 424451
gc_utoi 468799
dvdiu 576275
umodui 711392
cmpsr 796108
rdivss 839647
real2n 1068666
addri 1111482
equalis 1151351
equalsi 1151535
gc_utoipos 1153605
real_0 1159234
mpround 1216581
absrnz_equal2n 1301187
cmpss 1392943
Mod8 2073868
mpcmp 2161401
Mod2 2370296
udivuu_rem 2418379
gc_int 2739562
mulru 2765892
subir 3000321
equaliu 3021966
equalui 3021966
itou_or_0 3146588
maxdd 3211534
cmpis 3634496
negr 3683189
cmpsi 3866495
ceildivuu 3903899
Fl_center 4489146
absrnz_equal1 4556916
real_1_bit 4714355
mod4 5141243
subri 6061002
subsi 6184933
truedivsi 6202318
umuluu_or_0 6309335
affsi 6447480
maxuu 6611616
mulrs 7181596
fractor 7379568
umuluu_le 7617880
gc_NULL 7963542
cmpir 9459114
ugcdiu 10320385
affectsign_safe 10730752
uabsdiviu_rem 11892741
addrs 12364180
smodss 12474227
cmpiu 12968110
cmpui 12968175
rdivii 13104699
rdiviiz 13151502
mpabs_shallow 13428463
divii 14040120
utor 14268055
affur 14268179
mod8 15583065
subrs 16544354
dvdii 16905845
Fl_halve 18775116
modis 19638526
int_bit 20990888
smodis 21176102
hammingu 24048741
evalvalser 24359743
abscmpui 32019405
abscmpiu 32019425
mulri 38306139
mpexpo 38875841
absequaliu 39546340
absequalui 41296369
Mod4 43859121
itos_or_0 44912470
modsi 45242219
affui 45491532
Fl_div 46809796
stack_malloc 46929952
umodi2n 49002521
sdivsi_rem 51446834
gc_ulong 51701363
truedivii 54708946
stack_malloc_align 55536975
absi_shallow 56070991
affrr_fixlg 56115283
gc_bool 56816756
mod2 62590951
Fl_addmulmul_pre 64547664
minuu 69744979
remlll_pre 75655629
evalprecp 78673508
evalvalp 81630213
Fl_triple 87520948
mpsqr 90782622
addiu 96104689
Fl_sqr 99491317
addui 100178086
fixlg 105864897
mod2BIL 107447423
mpodd 116094156
icopyspec 118071963
subiu 133449386
real_1 133687841
subui 138426712
mpshift 153470710
togglesign_safe 157262254
dvmduBIL 165679899
itou 179086576
gc_double 184137759
shiftr 188186457
vali 191296442
addis 194754922
varncmp 199680342
gc_long 242695856
mpsub 249748105
utoineg 298254344
cgetineg 299114930
rtor 303782090
addsi 319940930
muliu 373570360
Fl_double 443652639
shiftr_inplace 466875279
mulis 467127017
itos 476286897
addir 482816716
real_0_bit 483866064
affsr 501360890
stor 501690003
mpadd 574129313
negi 641074304
itor 716808180
Fl_neg 729152064
umodsu 734165156
expu 797116711
stoi 799214120
lg2prec 815846691
mpmul 836900121
rcopy 916910032
mpneg 926946611
affii 964756724
subrr 1006454735
cmpuu 1489917362
cgetg_copy 1493191620
cgetr 1875858068
togglesign 1954150871
minss 2028134046
absi 2070372762
mpabs 2141338226
setabssign 2208742721
Fl_sqr_pre 2339424280
nbits2lg 2404289486
expi 2425910088
Fl_mul 2435732957
addrr 2932577933
remii 3062256004
adduu 3447447154
stackdummy 3682087380
Fl_mul_pre 4228697297
leafcopy 5066005767
shift_right 5732173570
Fl_add 6144257185
dvmdsBIL 7149771176
Fl_sub 7390865377
Fl_addmul_pre 7667604275
subii 7718848869
shift_left 7797859606
uutoi 8935028371
icopy 9156588542
maxss 9692324478
utoi 12049306945
addii 12533639001
evalexpo 13395214469
utoipos 14265797450
gc_const 15657471250
cgetipos 16448903401
cgetg 25521582565
cgeti 27477535709
new_chunk 95151074585
evallg 96862871941
set_avma 131375347179

Generated by: LCOV version 1.16