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 30561-4f4869c0e7) Lines: 605 680 89.0 %
Date: 2025-11-28 09:21:39 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 43867
sdivsi 102150
stack_calloc 110582
gc_stoi 155885
dvdui 167195
subis 170994
mod16 241356
Fl_ellj_pre 242619
truedivis 266832
mindd 270159
cmpri 282310
Mod32 311108
uutoineg 355623
Mod16 389733
cgetg_block 408350
gc_utoi 468579
dvdiu 576568
mpdiv 667710
cmpsr 796106
rdivss 839647
real2n 1067405
addri 1109337
gc_utoipos 1153856
real_0 1156753
equalis 1181663
equalsi 1181845
mpround 1216557
absrnz_equal2n 1292490
umodui 1296416
cmpss 1427033
Mod8 2073819
mpcmp 2227507
udivuu_rem 2416419
Mod2 2479176
gc_int 2574336
mulru 2765892
subir 3006712
equalui 3018549
equaliu 3018550
itou_or_0 3041673
maxdd 3182611
cmpis 3634924
negr 3671004
ceildivuu 3847456
cmpsi 3866920
Fl_center 4486496
absrnz_equal1 4519511
real_1_bit 4706252
maxuu 4815296
mod4 4932798
umuluu_or_0 5561914
umuluu_le 5803291
subsi 6117277
subri 6130664
truedivsi 6202031
affsi 6383307
mulrs 7181596
fractor 7376745
gc_NULL 7970891
cmpir 9426424
ugcdiu 10077449
cmpui 10120520
cmpiu 10120562
affectsign_safe 10737217
uabsdiviu_rem 11892741
addrs 12304908
smodss 12514726
rdivii 13099992
rdiviiz 13144047
mod8 13271707
mpabs_shallow 13428463
utor 13463361
affur 13463468
divii 14060084
subrs 16476754
dvdii 16552479
Fl_halve 18022640
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22326448
hammingu 24048574
abscmpiu 32146578
abscmpui 32146628
mulri 38033881
mpexpo 38858921
absequaliu 39660910
absequalui 41409839
itos_or_0 43598042
Mod4 43775389
modsi 45225550
affui 45473824
Fl_div 46571070
stack_malloc 46643856
truedivii 46798226
umodi2n 49027249
sdivsi_rem 51429878
gc_bool 51996726
gc_ulong 52167795
affrr_fixlg 54651362
stack_malloc_align 55493422
absi_shallow 57202414
Fl_addmulmul_pre 60067109
mod2 61153757
minuu 69122463
remlll_pre 75587141
evalprecp 78667687
evalvalp 81625075
mpsqr 90980315
Fl_sqr 94880497
addiu 94973618
Fl_triple 95218707
addui 98623423
mod2BIL 103593663
fixlg 104149299
mpodd 115085591
icopyspec 117029711
togglesign_safe 125503752
real_1 129803819
subiu 131688235
subui 136673182
mpshift 153195363
dvmduBIL 163160098
itou 177094733
shiftr 177979537
addis 181588320
gc_double 184420172
vali 190346315
varncmp 217212740
gc_long 242064708
mpsub 251534334
utoineg 294175995
cgetineg 295033594
rtor 295273032
addsi 306771980
muliu 373568347
itos 462050705
mulis 463137432
shiftr_inplace 463816058
Fl_double 468904731
real_0_bit 478726316
addir 479887393
affsr 486114235
stor 486411799
mpadd 574035898
negi 636699413
itor 713266768
Fl_neg 716606173
umodsu 724170897
stoi 772660239
expu 775337311
lg2prec 798027207
mpmul 837158143
rcopy 902737703
affii 909471995
mpneg 916639103
subrr 1000138301
cgetg_copy 1479773356
cmpuu 1492662185
cgetr 1838582476
togglesign 1911072024
minss 2008869744
absi 2060403869
mpabs 2131181008
Fl_sqr_pre 2154316447
setabssign 2197872883
nbits2lg 2362449513
Fl_mul 2414078812
expi 2453281712
addrr 2875907926
remii 3012582385
adduu 3411130751
stackdummy 3637994181
Fl_mul_pre 4083536054
Fl_add 4385789576
leafcopy 4963719577
shift_right 5624521126
dvmdsBIL 7013660351
Fl_sub 7271401863
subii 7665481458
Fl_addmul_pre 7679438624
shift_left 7681872750
uutoi 8810387783
icopy 9055298780
maxss 9710362114
utoi 11898469770
addii 12407772234
evalexpo 13126609464
utoipos 14142918253
gc_const 15514582888
cgetipos 16304751280
cgetg 24523599154
cgeti 27138887613
new_chunk 93237943450
evallg 95216579904
set_avma 128986803561

Generated by: LCOV version 1.16