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 30670-52869c8c38) Lines: 605 680 89.0 %
Date: 2026-02-05 09:23:49 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 33709
cmprs 40996
cgetr_block 43807
sdivsi 102150
stack_calloc 110383
gc_stoi 155884
dvdui 167195
subis 170920
Fl_ellj_pre 238058
mod16 241108
mindd 264338
truedivis 266969
cmpri 282310
Mod32 311108
uutoineg 362560
Mod16 389733
cgetg_block 424922
gc_utoi 468636
dvdiu 576273
mpdiv 665634
cmpsr 796089
rdivss 839647
real2n 1067044
addri 1106255
gc_utoipos 1153467
real_0 1156538
equalis 1185761
equalsi 1185943
mpround 1216577
absrnz_equal2n 1292596
umodui 1296276
cmpss 1392943
Mod8 2074212
mpcmp 2226430
Mod2 2370286
udivuu_rem 2418330
gc_int 2631214
mulru 2765892
subir 3005098
equaliu 3018216
equalui 3018220
itou_or_0 3041717
maxdd 3178580
cmpis 3634874
negr 3671633
cmpsi 3866874
ceildivuu 3904215
Fl_center 4486195
absrnz_equal1 4519995
real_1_bit 4704859
maxuu 4815275
mod4 5084859
umuluu_or_0 5520614
umuluu_le 5803291
subsi 6094065
subri 6136591
truedivsi 6202031
affsi 6373141
mulrs 7181596
fractor 7376925
gc_NULL 7962496
cmpir 9432871
ugcdiu 10113240
cmpiu 10132981
cmpui 10133029
affectsign_safe 10726689
uabsdiviu_rem 11892741
addrs 12305135
smodss 12614266
rdivii 13104960
rdiviiz 13147661
mod8 13162087
mpabs_shallow 13428463
utor 13461976
affur 13462094
divii 14055209
subrs 16475891
dvdii 16572911
Fl_halve 18815504
modis 19638526
int_bit 20970778
smodis 21176060
evalvalser 21528999
hammingu 24048383
abscmpiu 32333002
abscmpui 32333141
mulri 38033848
mpexpo 38875837
absequaliu 39661645
absequalui 41410559
itos_or_0 43600237
Mod4 43796624
modsi 45225482
affui 45473825
Fl_div 46565516
stack_malloc 46625389
truedivii 47035548
umodi2n 48940581
sdivsi_rem 51429813
gc_bool 51996620
gc_ulong 52071160
affrr_fixlg 54654243
stack_malloc_align 55501433
absi_shallow 57383791
mod2 61113267
Fl_addmulmul_pre 64700323
minuu 69297494
remlll_pre 76060291
evalprecp 78669802
evalvalp 81627217
mpsqr 91029667
Fl_triple 95064552
addiu 95349644
Fl_sqr 95910066
addui 98993833
mod2BIL 103306556
fixlg 104197914
mpodd 115076085
icopyspec 117434269
togglesign_safe 125532929
real_1 129822159
subiu 131854640
subui 136827459
mpshift 153219912
dvmduBIL 166032261
shiftr 177984965
itou 178244843
addis 181572588
gc_double 184167772
vali 190382409
varncmp 217202664
gc_long 242458930
mpsub 251591811
utoineg 293975789
cgetineg 294836458
rtor 295252469
addsi 306756905
muliu 374569550
itos 462167033
shiftr_inplace 464405406
mulis 466283749
Fl_double 471570154
real_0_bit 479176117
addir 481442815
affsr 486190816
stor 486499308
mpadd 574373979
negi 636901244
itor 715108883
Fl_neg 724199979
umodsu 734168370
stoi 772770496
expu 775481247
lg2prec 800081537
mpmul 837649536
rcopy 903325075
affii 910587930
mpneg 916844282
subrr 1000250987
cgetg_copy 1480342344
cmpuu 1492959776
cgetr 1840714507
togglesign 1912737650
minss 2010665124
absi 2067451452
mpabs 2138250002
Fl_sqr_pre 2180529321
setabssign 2204955076
nbits2lg 2366575990
Fl_mul 2420303381
expi 2448805482
addrr 2878292614
remii 3008635831
adduu 3410273525
stackdummy 3641309285
Fl_mul_pre 4111732085
Fl_add 4413040692
leafcopy 4976000600
shift_right 5634958289
dvmdsBIL 7013471927
Fl_sub 7280627370
subii 7641961313
shift_left 7678991051
Fl_addmul_pre 7689629148
uutoi 8814548703
icopy 9054351399
maxss 9709476151
utoi 11901152912
addii 12413016073
evalexpo 13141494183
utoipos 14149297602
gc_const 15514209976
cgetipos 16319219574
cgetg 24560762646
cgeti 27092555730
new_chunk 93254451041
evallg 95218913341
set_avma 129026653957

Generated by: LCOV version 1.16