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 30482-15ec328664) Lines: 605 680 89.0 %
Date: 2025-09-07 09:24:11 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4356435247
Fl_addmul_pre 7643053991
Fl_addmulmul_pre 60051761
Fl_center 4485527
Fl_div 46515708
Fl_double 473687042
Fl_ellj_pre 242629
Fl_halve 18018099
Fl_mul 2413608558
Fl_mul_pre 4078277576
Fl_neg 716325447
Fl_sqr 94825081
Fl_sqr_pre 2161666603
Fl_sub 7292263659
Fl_triple 95402548
Mod16 389733
Mod2 2479841
Mod32 311108
Mod4 44348539
Mod64 0
Mod8 2070208
abscmpiu 32729524
abscmpui 32729486
absequaliu 39649997
absequalui 41398898
absi 2060516505
absi_shallow 57780776
absr 140
absrnz_equal1 4515871
absrnz_equal2n 1288749
addii 12407808962
addir 479717189
addis 181736433
addiu 95843927
addri 1109371
addrr 2881309099
addrs 12304987
addsi 306921173
addss 25067
addui 99493261
adduu 3411088236
affectsign 0
affectsign_safe 10737965
affii 909048266
affrr_fixlg 55796576
affsi 6383129
affsr 495334316
affui 45473825
affur 13460274
ceildivuu 3845532
cgetg 24656959190
cgetg_block 393641
cgetg_copy 1479693007
cgeti 27128466883
cgetineg 295064968
cgetipos 16315467579
cgetr 1856846737
cgetr_block 43592
cmpir 9424799
cmpis 3633561
cmpiu 10116374
cmpri 282310
cmprs 40996
cmpsi 3865532
cmpsr 795884
cmpss 1427033
cmpui 10116006
cmpuu 1492922560
divii 14061885
divsi_rem 0
divss 0
divss_rem 0
dvdii 16475469
dvdiiz 0
dvdis 33912
dvdisz 0
dvdiu 576573
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7089301491
dvmdsi 0
dvmdss 0
dvmduBIL 165695812
equalis 1181653
equaliu 2995637
equalsi 1181835
equalui 2995640
evalexpo 13258722225
evallg 95453194662
evalprecp 78666646
evalvalp 81623405
evalvalser 21443044
expi 2454148872
expu 786984207
fixlg 105291953
fractor 7376327
gc_NULL 7968429
gc_bool 51911925
gc_const 15513223473
gc_double 184440543
gc_int 2574332
gc_long 241794390
gc_stoi 155882
gc_ulong 52129623
gc_utoi 468540
gc_utoipos 1153916
get_avma 0
hammingu 24045837
icopy 9056618474
icopyspec 117008529
int_bit 22263290
itor 713070135
itos 461719132
itos_or_0 43581774
itou 177063994
itou_or_0 3054271
leafcopy 4968963300
lg2prec 807096125
maxdd 3163978
maxss 9728360561
maxuu 4805122
mindd 270155
minss 2009086296
minuu 68977525
mod16 236596
mod2 61147572
mod2BIL 103331385
mod32 259
mod4 4700808
mod64 0
mod8 13271339
modis 19638518
modsi 45225538
modss 0
mpabs 2131750280
mpabs_shallow 13428463
mpadd 573892814
mpceil 0
mpcmp 2227515
mpcopy 665
mpdiv 667725
mpexpo 38853853
mpfloor 0
mpmul 836908813
mpneg 917750657
mpodd 115078433
mpround 1216547
mpshift 153210126
mpsqr 90962950
mpsub 251457599
mptrunc 49
mulis 463124892
muliu 372533632
mulri 38034257
mulrs 7181596
mulru 2765822
nbits2lg 2380488164
negi 637349486
negr 3670153
new_chunk 93438339414
rcopy 905592345
rdivii 13101590
rdiviiz 13145956
rdivis 0
rdivsi 0
rdivss 839647
real2n 1067413
real_0 1155982
real_0_bit 478090238
real_1 131212744
real_1_bit 4705782
real_m1 455
real_m2n 126
remii 3011357413
remis 0
remlll_pre 75494288
remsi 0
remss 0
rtor 300463377
sdivsi 102147
sdivsi_rem 51429865
sdivss_rem 0
set_avma 129277908021
setabssign 2198430445
shift_left 7753548171
shift_right 5671560293
shiftl 0
shiftlr 0
shiftr 180842146
shiftr_inplace 478415232
smodis 21176255
smodss 12472606
stack_calloc 110145
stack_calloc_align 3307
stack_malloc 46631312
stack_malloc_align 55487459
stackdummy 3643098803
stoi 772626800
stor 495640782
subii 7664682364
subir 3006682
subis 170991
subiu 131649613
subri 6114370
subrr 1000974071
subrs 16476669
subsi 6112164
subss 25067
subui 136343414
subuu 25067
thuemorseu 2851
togglesign 1914477932
togglesign_safe 125518536
truedivii 46809972
truedivis 266812
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 16693
udivuu_rem 2416391
ugcdiu 10085648
ugcdui 2737
umodi2n 49599611
umodsu 724146672
umodui 1296416
umuluu_le 5800680
umuluu_or_0 5546699
utoi 11900750160
utoineg 294207322
utoipos 14148479429
utor 13460163
uutoi 8809016696
uutoineg 355429
vali 190292741
varncmp 217201775
varnmax 203
varnmin 15547

Generated by: LCOV version 1.16