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 30549-267e77144f) Lines: 605 680 89.0 %
Date: 2025-11-16 09:22:34 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 43863
sdivsi 102148
stack_calloc 110580
gc_stoi 155882
dvdui 167195
subis 170993
mod16 241356
Fl_ellj_pre 242631
truedivis 266823
mindd 270158
cmpri 282310
Mod32 311108
uutoineg 355717
Mod16 389733
cgetg_block 408319
gc_utoi 468567
dvdiu 576565
mpdiv 667721
cmpsr 796096
rdivss 839647
real2n 1067414
addri 1109259
gc_utoipos 1153842
real_0 1156538
equalis 1181707
equalsi 1181889
mpround 1216544
absrnz_equal2n 1291418
umodui 1296416
cmpss 1427033
Mod8 2073814
mpcmp 2227551
udivuu_rem 2416419
Mod2 2479235
gc_int 2574296
mulru 2765892
subir 3006696
equaliu 3018664
equalui 3018664
itou_or_0 3041673
maxdd 3182735
cmpis 3633564
negr 3671171
ceildivuu 3848220
cmpsi 3865534
Fl_center 4485552
absrnz_equal1 4518371
real_1_bit 4706180
maxuu 4815104
mod4 4932387
umuluu_or_0 5501829
umuluu_le 5803291
subsi 6117347
subri 6127089
truedivsi 6202031
affsi 6383380
mulrs 7181596
fractor 7376741
gc_NULL 7970529
cmpir 9427265
ugcdiu 10082783
cmpiu 10120989
cmpui 10120995
affectsign_safe 10737657
uabsdiviu_rem 11892741
addrs 12303938
smodss 12550186
rdivii 13101266
rdiviiz 13146126
mod8 13272623
mpabs_shallow 13428463
utor 13463138
affur 13463245
divii 14062636
subrs 16475787
dvdii 16559665
Fl_halve 18031346
modis 19638526
smodis 21176263
evalvalser 21527935
int_bit 22280669
hammingu 24045796
abscmpui 32878131
abscmpiu 32878273
mulri 38034175
mpexpo 38856507
absequaliu 39660497
absequalui 41409442
itos_or_0 43596445
Mod4 43774581
modsi 45225510
affui 45473825
Fl_div 46534678
stack_malloc 46641502
truedivii 46810087
umodi2n 49026859
sdivsi_rem 51429838
gc_bool 52001123
gc_ulong 52169070
affrr_fixlg 54648383
stack_malloc_align 55489936
absi_shallow 57930519
Fl_addmulmul_pre 60070843
mod2 61154682
minuu 69071788
remlll_pre 75665815
evalprecp 78667508
evalvalp 81624604
mpsqr 90978092
Fl_sqr 94871267
Fl_triple 95598274
addiu 96452093
addui 100101888
mod2BIL 103593698
fixlg 104146525
mpodd 115086752
icopyspec 117027695
togglesign_safe 125516694
real_1 129802310
subiu 131678520
subui 136663724
mpshift 153217838
dvmduBIL 165731415
itou 177093512
shiftr 177968297
addis 181606486
gc_double 184408235
vali 190343527
varncmp 217212316
gc_long 242066913
mpsub 251523203
utoineg 294179888
cgetineg 295037416
rtor 295267583
addsi 306792572
muliu 373456422
itos 462058587
mulis 463151926
shiftr_inplace 463942489
Fl_double 470038380
real_0_bit 478852972
addir 479892153
affsr 486085444
stor 486372413
mpadd 574094280
negi 636725075
itor 713260986
Fl_neg 716597962
umodsu 724214018
stoi 772532798
expu 775328971
lg2prec 798014970
mpmul 837231082
rcopy 902768015
affii 909342179
mpneg 916683625
subrr 1000169189
cgetg_copy 1479796240
cmpuu 1492596973
cgetr 1838654317
togglesign 1911087174
minss 2009105799
absi 2060587941
mpabs 2131376716
Fl_sqr_pre 2152410512
setabssign 2198047158
nbits2lg 2362390591
Fl_mul 2415435144
expi 2453299974
addrr 2875761399
remii 3013402094
adduu 3412823969
stackdummy 3644305454
Fl_mul_pre 4083039756
Fl_add 4381847949
leafcopy 4965047801
shift_right 5627294438
dvmdsBIL 7015261317
Fl_sub 7300736362
Fl_addmul_pre 7650496903
subii 7664745771
shift_left 7683877595
uutoi 8812076705
icopy 9056794893
maxss 9737687698
utoi 11904922506
addii 12410149818
evalexpo 13128150663
utoipos 14148976644
gc_const 15514653731
cgetipos 16305681207
cgetg 24537707519
cgeti 27132996273
new_chunk 93256783627
evallg 95228203828
set_avma 129001101655

Generated by: LCOV version 1.16