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 30556-bb9f5f8fc8) Lines: 605 680 89.0 %
Date: 2025-11-25 09:20:50 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 43685
sdivsi 102146
stack_calloc 110032
gc_stoi 155905
dvdui 167195
subis 170989
mod16 241356
Fl_ellj_pre 242635
truedivis 265696
mindd 269140
cmpri 282310
Mod32 311108
uutoineg 355377
Mod16 389726
cgetg_block 401712
gc_utoi 468655
dvdiu 576100
mpdiv 664637
cmpsr 796096
rdivss 839647
real2n 1062105
addri 1105771
gc_utoipos 1151354
real_0 1155144
equalis 1177820
equalsi 1178002
mpround 1193684
absrnz_equal2n 1287996
umodui 1296409
cmpss 1427033
Mod8 2073936
mpcmp 2222931
udivuu_rem 2416272
Mod2 2479306
gc_int 2571397
mulru 2765892
subir 3002238
equaliu 3015635
equalui 3015636
itou_or_0 3041628
maxdd 3161574
cmpis 3634814
negr 3669765
ceildivuu 3843448
cmpsi 3866524
Fl_center 4481261
absrnz_equal1 4513043
real_1_bit 4685385
maxuu 4815225
mod4 4932720
umuluu_or_0 5511439
umuluu_le 5803291
subri 5973493
subsi 6117411
truedivsi 6200911
affsi 6361509
mulrs 7181596
fractor 7375525
gc_NULL 7928857
cmpir 9321043
ugcdiu 10076352
cmpiu 10120629
cmpui 10120659
affectsign_safe 10712146
uabsdiviu_rem 11892741
addrs 12286412
smodss 12500826
rdivii 13097130
rdiviiz 13143206
mod8 13273223
mpabs_shallow 13428463
utor 13451504
affur 13451623
divii 14013296
dvdii 16420916
subrs 16435840
Fl_halve 18025789
modis 19638526
smodis 21176032
evalvalser 21527935
int_bit 22303428
hammingu 24047843
abscmpiu 32382000
abscmpui 32382063
mulri 38032524
mpexpo 38732761
absequaliu 38838658
absequalui 40587569
Mod4 43455000
itos_or_0 43595532
modsi 45224227
affui 45473852
Fl_div 46441957
stack_malloc 46602155
truedivii 46714650
umodi2n 48707085
sdivsi_rem 51427435
gc_bool 51642181
gc_ulong 52134524
affrr_fixlg 54610070
stack_malloc_align 55252698
mod2 56125635
absi_shallow 57224305
Fl_addmulmul_pre 60044110
minuu 68897074
remlll_pre 75387047
evalprecp 78664702
evalvalp 81621267
mpsqr 90300633
mpodd 94691923
Fl_sqr 94791838
Fl_triple 95420841
addiu 95426340
mod2BIL 98566430
addui 99076028
fixlg 103981425
icopyspec 115985134
togglesign_safe 125404135
real_1 129369506
subiu 131582110
subui 136564269
mpshift 152120413
dvmduBIL 165606170
itou 175961014
shiftr 177556191
addis 181007144
gc_double 182159130
vali 187090209
varncmp 216972905
gc_long 241974902
mpsub 244387064
utoineg 289753278
cgetineg 290606540
rtor 294360994
addsi 306190869
muliu 364799464
itos 460309618
real_0_bit 462263331
mulis 462378941
shiftr_inplace 463383274
Fl_double 468984704
addir 476767193
affsr 485773114
stor 486064860
mpadd 554264504
negi 627199924
itor 707019865
Fl_neg 712581249
umodsu 724334631
stoi 771902282
expu 773208218
lg2prec 796180888
mpmul 810308435
rcopy 897496461
mpneg 905970348
affii 908887908
subrr 989354791
cgetg_copy 1469344500
cmpuu 1490826547
cgetr 1830276913
togglesign 1895904077
minss 2003414724
absi 2044229071
mpabs 2114201212
Fl_sqr_pre 2148586108
setabssign 2179212320
nbits2lg 2338707666
Fl_mul 2377399682
expi 2442305997
addrr 2846623313
remii 2969786259
adduu 3356966225
stackdummy 3630200507
Fl_mul_pre 4069760967
Fl_add 4341357654
leafcopy 4926641810
shift_right 5579976078
dvmdsBIL 6982066685
Fl_sub 7208736389
subii 7580221111
shift_left 7651368030
Fl_addmul_pre 7663178447
uutoi 8696356636
icopy 8911926052
maxss 9552652556
utoi 11677451388
addii 12088294829
evalexpo 13043774482
utoipos 13952593236
gc_const 15347582092
cgetipos 16099063813
cgetg 24275952145
cgeti 26844611823
new_chunk 92322222326
evallg 94299329640
set_avma 127737038977

Generated by: LCOV version 1.16