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 30733-eb2d773d38) Lines: 605 680 89.0 %
Date: 2026-03-03 09:24:12 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 10451
uabsdivui_rem 16693
addss 24997
subss 24997
subuu 24997
dvdis 33730
cmprs 40996
cgetr_block 43820
sdivsi 102079
stack_calloc 110580
gc_stoi 155901
dvdui 167195
subis 171668
Fl_ellj_pre 238049
mindd 264378
truedivis 267000
cmpri 282310
mod16 307013
Mod32 311108
uutoineg 363827
Mod16 389733
cgetg_block 425300
gc_utoi 468693
dvdiu 576277
mpdiv 665648
cmpsr 796106
rdivss 839647
real2n 1067460
addri 1106214
equalis 1150790
equalsi 1150971
gc_utoipos 1153600
real_0 1156644
mpround 1216582
umodui 1291849
absrnz_equal2n 1292616
cmpss 1392943
Mod8 2074132
mpcmp 2226346
Mod2 2370261
udivuu_rem 2418379
gc_int 2631217
mulru 2765892
subir 3005043
equaliu 3018729
equalui 3018729
itou_or_0 3146866
maxdd 3179161
cmpis 3633542
negr 3671842
cmpsi 3865545
ceildivuu 3904002
Fl_center 4486195
absrnz_equal1 4520181
real_1_bit 4707026
maxuu 4815584
mod4 5139186
umuluu_le 5803291
subri 6083762
umuluu_or_0 6148812
subsi 6182570
truedivsi 6202031
affsi 6439567
mulrs 7181596
fractor 7376924
gc_NULL 7963533
cmpir 9433511
ugcdiu 10147408
affectsign_safe 10729451
uabsdiviu_rem 11892741
cmpiu 12179610
cmpui 12179760
addrs 12304778
smodss 12618180
rdivii 13103055
rdiviiz 13144715
mpabs_shallow 13428463
utor 13463060
affur 13463178
divii 14051993
mod8 15578610
subrs 16477745
dvdii 16906981
Fl_halve 18822180
modis 19638526
int_bit 20994228
smodis 21176081
evalvalser 21529069
hammingu 24048685
abscmpiu 32366297
abscmpui 32366353
mulri 38033891
mpexpo 38873813
absequaliu 39352327
absequalui 41101239
itos_or_0 43601306
Mod4 43861636
modsi 45225773
affui 45473824
Fl_div 46559857
stack_malloc 46825301
umodi2n 49005993
sdivsi_rem 51430101
gc_ulong 52082444
affrr_fixlg 54655639
truedivii 54692816
stack_malloc_align 55521436
gc_bool 56145654
absi_shallow 56350668
mod2 61230209
Fl_addmulmul_pre 64701606
minuu 69745962
remlll_pre 76178371
evalprecp 78671760
evalvalp 81628317
mpsqr 91025160
Fl_triple 91233492
addiu 96692851
Fl_sqr 99460141
addui 100340499
fixlg 104201481
mod2BIL 106066307
mpodd 115173837
icopyspec 117468927
real_1 129858252
subiu 131920108
subui 136894623
mpshift 153316530
togglesign_safe 157192459
dvmduBIL 159197125
shiftr 178083780
itou 178236500
gc_double 184148146
addis 184542195
vali 190429926
varncmp 207210167
gc_long 242530080
mpsub 251543831
rtor 295305573
utoineg 297084059
cgetineg 297944520
addsi 309729515
muliu 375712968
Fl_double 453260092
shiftr_inplace 464500796
mulis 467006336
itos 472261437
real_0_bit 477560777
addir 481440388
affsr 486278701
stor 486594092
mpadd 572794280
negi 640354459
itor 715106036
Fl_neg 723782459
umodsu 734193085
expu 775704298
stoi 797019145
lg2prec 800210771
mpmul 836005942
rcopy 903469674
mpneg 920348216
affii 957319535
subrr 1000294305
cgetg_copy 1452368968
cmpuu 1490525258
cgetr 1840785176
togglesign 1943097363
minss 2008131413
absi 2065949753
mpabs 2136788009
Fl_sqr_pre 2156160986
setabssign 2203491860
nbits2lg 2365705254
expi 2420673307
Fl_mul 2428792020
addrr 2876137498
remii 3018148716
adduu 3442339158
stackdummy 3626667403
Fl_mul_pre 4086557391
Fl_add 4401461532
leafcopy 4977590427
shift_right 5633522209
dvmdsBIL 7031841727
Fl_sub 7218594783
Fl_addmul_pre 7671464769
subii 7682399637
shift_left 7694289708
uutoi 8926625176
icopy 9058104860
maxss 9702989799
utoi 12034988882
addii 12542365388
evalexpo 13161063019
utoipos 14246046418
gc_const 15597975179
cgetipos 16408589792
cgetg 24570806677
cgeti 27263987074
new_chunk 93549337632
evallg 95381366900
set_avma 129521533208

Generated by: LCOV version 1.16