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 30347-cb65b7994e) Lines: 605 680 89.0 %
Date: 2025-06-27 09:22:08 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4347745876
Fl_addmul_pre 7588990857
Fl_addmulmul_pre 59573407
Fl_center 4030201
Fl_div 46483123
Fl_double 475760899
Fl_ellj_pre 242808
Fl_halve 18071785
Fl_mul 2382905487
Fl_mul_pre 4020672916
Fl_neg 711212681
Fl_sqr 94839919
Fl_sqr_pre 2162006380
Fl_sub 7277025421
Fl_triple 96333132
Mod16 277481
Mod2 2024379
Mod32 199255
Mod4 44341158
Mod64 0
Mod8 2070299
abscmpiu 32105947
abscmpui 32106132
absequaliu 39601699
absequalui 41350594
absi 2063954885
absi_shallow 58739623
absr 140
absrnz_equal1 4515346
absrnz_equal2n 1288848
addii 12369131833
addir 477178498
addis 181263641
addiu 96751478
addri 1109337
addrr 2864990335
addrs 12353673
addsi 306445958
addss 25067
addui 100255749
adduu 3407701773
affectsign 0
affectsign_safe 10736771
affii 908889760
affrr_fixlg 55857512
affsi 6396324
affsr 495413248
affui 45473650
affur 13443890
ceildivuu 3845123
cgetg 24450792149
cgetg_block 392988
cgetg_copy 1469671712
cgeti 27195750940
cgetineg 268104445
cgetipos 16399634343
cgetr 1855959929
cgetr_block 43485
cmpir 9424945
cmpis 3633435
cmpiu 9659093
cmpri 282261
cmprs 40996
cmpsi 3865385
cmpsr 824654
cmpss 1432120
cmpui 9658914
cmpuu 1440488879
divii 14056410
divsi_rem 0
divss 0
divss_rem 0
dvdii 16478380
dvdiiz 0
dvdis 33912
dvdisz 0
dvdiu 576573
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7060744193
dvmdsi 0
dvmdss 0
dvmduBIL 165522722
equalis 1174501
equaliu 2995001
equalsi 1174683
equalui 2995002
evalexpo 13212380445
evallg 95213838772
evalprecp 78665918
evalvalp 81622664
evalvalser 21443016
expi 2452809471
expu 783556472
fixlg 103806782
fractor 7375262
gc_NULL 7902139
gc_bool 51916940
gc_const 15487811512
gc_double 182115808
gc_int 2574145
gc_long 239211234
gc_stoi 150802
gc_ulong 37182683
gc_utoi 468541
gc_utoipos 1153902
get_avma 0
hammingu 24045212
icopy 9076982643
icopyspec 116478909
int_bit 22247807
itor 712091006
itos 458844003
itos_or_0 24091681
itou 171931494
itou_or_0 2996086
leafcopy 4954437994
lg2prec 806401953
maxdd 3162998
maxss 9592254447
maxuu 4804920
mindd 268630
minss 2008957427
minuu 67972730
mod16 236580
mod2 61025167
mod2BIL 102075359
mod32 259
mod4 4676528
mod64 0
mod8 13200623
modis 19602559
modsi 45223221
modss 0
mpabs 2135140991
mpabs_shallow 13428463
mpadd 573888944
mpceil 0
mpcmp 2227492
mpcopy 708
mpdiv 667711
mpexpo 38843868
mpfloor 0
mpmul 836901567
mpneg 920362836
mpodd 114962121
mpround 1216536
mpshift 153166337
mpsqr 90938258
mpsub 251472748
mptrunc 49
mulis 463891435
muliu 371917620
mulri 37887732
mulrs 7181596
mulru 2765822
nbits2lg 2379881422
negi 641502235
negr 3692400
new_chunk 93238304758
rcopy 899012830
rdivii 13098823
rdiviiz 13143000
rdivis 0
rdivsi 0
rdivss 839647
real2n 1060988
real_0 1155926
real_0_bit 478109775
real_1 131549257
real_1_bit 4700748
real_m1 455
real_m2n 126
remii 3007137137
remis 0
remlll_pre 75082463
remsi 0
remss 0
rtor 300128869
sdivsi 102150
sdivsi_rem 51427547
sdivss_rem 0
set_avma 128833078951
setabssign 2201393753
shift_left 7730720806
shift_right 5644046015
shiftl 0
shiftlr 0
shiftr 180012068
shiftr_inplace 478041494
smodis 21140226
smodss 12426960
stack_calloc 109456
stack_calloc_align 3300
stack_malloc 46469826
stack_malloc_align 55378733
stackdummy 3631945346
stoi 745298113
stor 495778775
subii 7634762351
subir 3006032
subis 170994
subiu 130152311
subri 6130918
subrr 995435004
subrs 16512602
subsi 6105168
subss 25067
subui 134391334
subuu 25067
thuemorseu 2851
togglesign 1924735425
togglesign_safe 125073459
truedivii 46787948
truedivis 266799
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 19089
udivuu_rem 159298367
ugcdiu 9986017
ugcdui 2737
umodi2n 48912556
umodsu 722951557
umodui 1296416
umuluu_le 5800680
umuluu_or_0 5529685
utoi 11864446050
utoineg 267247097
utoipos 14220099808
utor 13443783
uutoi 8803089058
uutoineg 355107
vali 187745078
varncmp 217148618
varnmax 203
varnmin 15547

Generated by: LCOV version 1.16