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 30558-88b7dc3357) Lines: 607 680 89.3 %
Date: 2025-11-26 09:22:00 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 102151
stack_calloc 110586
gc_stoi 155884
dvdui 167195
subis 170995
mod16 241349
Fl_ellj_pre 242633
truedivis 266859
mindd 270158
cmpri 282310
Mod32 311108
uutoineg 355641
Mod16 389733
cgetg_block 408342
gc_utoi 468563
dvdiu 576568
mpdiv 667702
cmpsr 796109
rdivss 839647
real2n 1067402
addri 1109237
gc_utoipos 1153845
real_0 1156723
equalis 1181598
equalsi 1181780
mpround 1216539
absrnz_equal2n 1292500
umodui 1296415
cmpss 1427033
Mod8 2073900
mpcmp 2227510
udivuu_rem 2416419
Mod2 2479106
gc_int 2574325
mulru 2765892
subir 3006689
equalui 3018556
equaliu 3018566
itou_or_0 3041666
maxdd 3182291
cmpis 3634902
negr 3670903
ceildivuu 3848214
cmpsi 3866902
Fl_center 4486494
absrnz_equal1 4519431
real_1_bit 4706190
maxuu 4815093
mod4 4932545
umuluu_or_0 5540406
umuluu_le 5803291
subsi 6117362
subri 6121705
truedivsi 6202031
affsi 6383256
mulrs 7181596
fractor 7376744
gc_NULL 7969138
cmpir 9428503
ugcdiu 10075989
cmpui 10120530
cmpiu 10120582
affectsign_safe 10736459
uabsdiviu_rem 11892741
addrs 12304779
smodss 12520173
rdivii 13100532
rdiviiz 13143551
mod8 13271869
mpabs_shallow 13428463
utor 13463356
affur 13463458
divii 14059573
subrs 16476623
dvdii 16554031
Fl_halve 18024474
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22310793
hammingu 24048604
abscmpui 32387927
abscmpiu 32388023
mulri 38033896
mpexpo 38856656
absequaliu 39660672
absequalui 41409593
itos_or_0 43598423
Mod4 43775709
modsi 45225525
affui 45473825
Fl_div 46541203
stack_malloc 46643746
truedivii 46801251
umodi2n 49027915
sdivsi_rem 51429853
gc_bool 51999988
gc_ulong 52172756
affrr_fixlg 54651169
stack_malloc_align 55490063
absi_shallow 57444766
Fl_addmulmul_pre 60081126
mod2 61153645
minuu 69081866
remlll_pre 75558508
evalprecp 78666370
evalvalp 81623719
mpsqr 90973938
Fl_sqr 94847495
Fl_triple 95094624
addiu 95456242
addui 99105997
mod2BIL 103592600
fixlg 104149031
mpodd 115085933
icopyspec 117030208
togglesign_safe 125524517
real_1 129797301
subiu 131686862
subui 136671868
mpshift 153217160
dvmduBIL 165687198
itou 177093338
shiftr 177977137
addis 181583002
gc_double 184383191
vali 190347768
varncmp 217212645
gc_long 242071104
mpsub 251480446
utoineg 294173279
cgetineg 295030795
rtor 295271074
addsi 306762273
muliu 373491097
itos 462054706
mulis 463133790
shiftr_inplace 463926522
Fl_double 468661137
real_0_bit 479087700
addir 479877396
affsr 486121693
stor 486415910
mpadd 574308406
negi 636783795
itor 713215285
Fl_neg 716610022
umodsu 724206041
stoi 772578957
expu 775347478
lg2prec 798059619
mpmul 837381286
rcopy 902705231
affii 909325331
mpneg 916717383
subrr 1000081478
cgetg_copy 1479775382
cmpuu 1492631605
cgetr 1838530417
togglesign 1911130372
minss 2008457437
absi 2060305702
mpabs 2131078891
Fl_sqr_pre 2154036130
setabssign 2197732164
nbits2lg 2362671411
Fl_mul 2414636521
expi 2453161776
addrr 2876338198
remii 3012010188
adduu 3411209091
stackdummy 3640403560
Fl_mul_pre 4089749896
Fl_add 4385679429
leafcopy 4964478181
shift_right 5624515018
dvmdsBIL 7013970834
Fl_sub 7278001336
subii 7664569747
shift_left 7681743212
Fl_addmul_pre 7684016123
uutoi 8809445189
icopy 9056089805
maxss 9717863373
utoi 11897638173
addii 12407352931
evalexpo 13127751742
utoipos 14141821492
gc_const 15514002866
cgetipos 16303696353
cgetg 24526926648
cgeti 27135882325
new_chunk 93232994099
evallg 95223602193
set_avma 128975887016

Generated by: LCOV version 1.16