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 30586-ccf601f509) Lines: 605 680 89.0 %
Date: 2025-12-25 09:21:36 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 43836
sdivsi 102150
stack_calloc 110377
gc_stoi 155880
dvdui 167195
subis 170919
Fl_ellj_pre 238054
mod16 241110
mindd 264327
truedivis 266941
cmpri 282310
Mod32 311108
uutoineg 362705
Mod16 389733
cgetg_block 407125
gc_utoi 468485
dvdiu 576266
mpdiv 665637
cmpsr 796106
rdivss 839647
real2n 1067012
addri 1105692
gc_utoipos 1153462
real_0 1156458
equalis 1181977
equalsi 1182159
mpround 1216576
absrnz_equal2n 1292752
umodui 1296276
cmpss 1379853
Mod8 2074014
mpcmp 2225708
udivuu_rem 2416412
Mod2 2479276
gc_int 2570048
mulru 2765892
subir 3005113
equaliu 3018198
equalui 3018198
itou_or_0 3041668
maxdd 3177122
cmpis 3634909
negr 3671433
cmpsi 3866910
ceildivuu 3879439
Fl_center 4485979
absrnz_equal1 4520627
real_1_bit 4704647
maxuu 4815349
mod4 4932575
umuluu_or_0 5494908
umuluu_le 5803291
subsi 6093336
subri 6131787
truedivsi 6202031
affsi 6373050
mulrs 7181596
fractor 7376763
gc_NULL 7961146
cmpir 9432768
ugcdiu 10104067
cmpiu 10117780
cmpui 10117810
affectsign_safe 10726652
uabsdiviu_rem 11892741
addrs 12305646
smodss 12574500
rdivii 13102988
rdiviiz 13147068
mod8 13162612
mpabs_shallow 13428463
utor 13461838
affur 13461955
divii 14048311
subrs 16476010
dvdii 16567213
Fl_halve 18786745
modis 19638526
int_bit 20982566
smodis 21176060
evalvalser 21527935
hammingu 24048278
abscmpiu 32614280
abscmpui 32614295
mulri 38033517
mpexpo 38878262
absequaliu 39660916
absequalui 41409842
itos_or_0 43598600
Mod4 43747287
modsi 45225555
affui 45473825
Fl_div 46509703
stack_malloc 46627310
truedivii 47024542
umodi2n 49000147
sdivsi_rem 51429883
gc_bool 51997392
gc_ulong 52076981
affrr_fixlg 54654807
stack_malloc_align 55496349
absi_shallow 57653633
mod2 61111735
Fl_addmulmul_pre 64584096
minuu 69151532
remlll_pre 75684269
evalprecp 78669595
evalvalp 81626250
mpsqr 91030757
Fl_triple 94480967
Fl_sqr 95887015
addiu 95895167
addui 99539231
mod2BIL 103154237
fixlg 104198417
mpodd 115074089
icopyspec 117081150
togglesign_safe 125622451
real_1 129816259
subiu 131485962
subui 136458604
mpshift 153146093
dvmduBIL 165591715
itou 177596392
shiftr 177981613
addis 181595796
gc_double 184176593
vali 190313805
varncmp 217206310
gc_long 242228156
mpsub 251618486
utoineg 293814839
cgetineg 294676498
rtor 295245041
addsi 306780447
muliu 372039554
itos 462132373
shiftr_inplace 464148572
mulis 464524902
Fl_double 469406162
real_0_bit 479361881
addir 480529512
affsr 486209264
stor 486483097
mpadd 574628055
negi 636792876
itor 713462387
Fl_neg 719236349
umodsu 723955762
stoi 772767836
expu 775291758
lg2prec 798427167
mpmul 837880638
rcopy 903196974
affii 910356080
mpneg 916711670
subrr 1000226851
cgetg_copy 1479993750
cmpuu 1492644966
cgetr 1838984379
togglesign 1911172328
minss 2008899233
absi 2067632249
mpabs 2138408638
Fl_sqr_pre 2173806088
setabssign 2205075243
nbits2lg 2365477520
Fl_mul 2420001085
expi 2446367309
addrr 2877130525
remii 3005749591
adduu 3412492851
stackdummy 3640741496
Fl_mul_pre 4099873946
Fl_add 4394816226
leafcopy 4972776477
shift_right 5629029512
dvmdsBIL 7006507808
Fl_sub 7276404627
subii 7656711271
Fl_addmul_pre 7674637433
shift_left 7675176649
uutoi 8817757082
icopy 9055804468
maxss 9713240792
utoi 11909918865
addii 12411766435
evalexpo 13132346328
utoipos 14151904331
gc_const 15491705610
cgetipos 16313540528
cgetg 24535662447
cgeti 27105959720
new_chunk 93206901792
evallg 95168015204
set_avma 128919708813

Generated by: LCOV version 1.16