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 30831-19b50a36d0) Lines: 607 680 89.3 %
Date: 2026-04-21 09:26:02 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 33737
cmprs 40996
cgetr_block 44292
sdivsi 102149
stack_calloc 110708
gc_stoi 155901
dvdui 167195
subis 171739
Fl_ellj_pre 238057
mindd 264381
truedivis 268375
cmpri 302870
mod16 307030
Mod32 311108
uutoineg 362775
Mod16 389733
mpdiv 395375
cgetg_block 423676
gc_utoi 468777
dvdiu 576271
umodui 711392
cmpsr 796097
rdivss 839647
real2n 1068647
addri 1106203
equalis 1151448
equalsi 1151630
gc_utoipos 1153608
real_0 1157763
mpround 1216577
absrnz_equal2n 1301129
cmpss 1392943
Mod8 2073763
mpcmp 2156208
Mod2 2370170
udivuu_rem 2418379
gc_int 2739314
mulru 2765892
subir 3000065
equalui 3021814
equaliu 3021816
itou_or_0 3147009
maxdd 3211665
cmpis 3634399
negr 3683269
cmpsi 3866407
ceildivuu 3904014
Fl_center 4486013
absrnz_equal1 4556934
real_1_bit 4714166
mod4 5140574
subri 6048786
subsi 6184822
truedivsi 6202318
umuluu_or_0 6256906
affsi 6446390
maxuu 6610670
mulrs 7181596
fractor 7380423
umuluu_le 7617880
gc_NULL 7961867
cmpir 9458879
ugcdiu 10321028
affectsign_safe 10731269
uabsdiviu_rem 11892741
addrs 12364149
smodss 12501195
cmpiu 12982950
cmpui 12983081
rdivii 13104368
rdiviiz 13149067
mpabs_shallow 13428463
divii 14045013
utor 14266487
affur 14266596
mod8 15585499
subrs 16544366
dvdii 16904327
Fl_halve 18752203
modis 19638526
int_bit 20962543
smodis 21176088
hammingu 24048703
evalvalser 24359582
abscmpui 33821218
abscmpiu 33821340
mulri 38307445
mpexpo 38872892
absequaliu 39545856
absequalui 41295878
Mod4 43848092
itos_or_0 44911052
modsi 45242180
affui 45491531
Fl_div 46723073
stack_malloc 46923259
umodi2n 48991083
sdivsi_rem 51446798
gc_ulong 51681042
truedivii 54694419
stack_malloc_align 55532266
affrr_fixlg 56114414
gc_bool 56794283
absi_shallow 57862443
mod2 62589516
Fl_addmulmul_pre 64575056
minuu 69679776
remlll_pre 75674607
evalprecp 78675156
evalvalp 81631667
Fl_triple 87262903
mpsqr 90774768
Fl_sqr 99470001
addiu 99712819
addui 103787897
fixlg 105854170
mod2BIL 107447344
mpodd 116093488
icopyspec 118026905
subiu 133458830
real_1 133677354
subui 138435934
mpshift 153502730
togglesign_safe 157244928
dvmduBIL 165655972
itou 179082241
gc_double 184085017
shiftr 188185885
vali 191178690
addis 194777270
varncmp 199456905
gc_long 242673814
mpsub 249682218
utoineg 298139493
cgetineg 299000018
rtor 303777506
addsi 319963393
muliu 373373441
Fl_double 442408773
shiftr_inplace 466789080
mulis 467106835
itos 476249006
addir 482789488
real_0_bit 483932670
affsr 501382865
stor 501715891
mpadd 574102979
negi 641034176
itor 716734022
Fl_neg 729002117
umodsu 734156485
expu 797086800
stoi 799142758
lg2prec 815936935
mpmul 836833081
rcopy 916825145
mpneg 926909161
affii 964795192
subrr 1006398404
cmpuu 1490472637
cgetg_copy 1492121138
cgetr 1875706307
togglesign 1953749218
minss 2027929808
absi 2068829562
mpabs 2139780771
setabssign 2207082581
Fl_sqr_pre 2335679950
nbits2lg 2404125344
expi 2425298251
Fl_mul 2438426077
addrr 2932955565
remii 3062332908
adduu 3450730479
stackdummy 3690794803
Fl_mul_pre 4216690055
leafcopy 5063993839
shift_right 5730701547
Fl_add 6146898456
dvmdsBIL 7149303853
Fl_sub 7417580285
Fl_addmul_pre 7654298104
subii 7720206731
shift_left 7796566541
uutoi 8937848860
icopy 9155595277
maxss 9726632101
utoi 12052765448
addii 12533337527
evalexpo 13398494801
utoipos 14269278649
gc_const 15654774849
cgetipos 16454529586
cgetg 25533943771
cgeti 27486368345
new_chunk 95145379689
evallg 96894807439
set_avma 131379190126

Generated by: LCOV version 1.16