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 30735-65f72320ad) Lines: 605 680 89.0 %
Date: 2026-03-10 09:24:00 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 10374
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33730
cmprs 40996
cgetr_block 43788
sdivsi 102146
stack_calloc 110552
gc_stoi 155900
dvdui 167195
subis 171736
Fl_ellj_pre 238063
mindd 264380
truedivis 266975
cmpri 282310
mod16 307027
Mod32 311108
uutoineg 363654
Mod16 389733
cgetg_block 425342
gc_utoi 468725
dvdiu 576279
mpdiv 665511
cmpsr 796108
rdivss 839647
real2n 1067474
addri 1106290
equalis 1150983
equalsi 1151165
gc_utoipos 1153616
real_0 1156643
mpround 1216580
umodui 1290953
absrnz_equal2n 1292629
cmpss 1392943
Mod8 2074037
mpcmp 2226346
Mod2 2370075
udivuu_rem 2418379
gc_int 2631195
mulru 2765892
subir 3004979
equaliu 3018931
equalui 3018931
itou_or_0 3147015
maxdd 3179375
cmpis 3633529
negr 3671634
cmpsi 3865537
ceildivuu 3904720
Fl_center 4486195
absrnz_equal1 4520272
real_1_bit 4707088
maxuu 4815448
mod4 5138869
umuluu_le 5803291
subri 6061236
umuluu_or_0 6144694
subsi 6182968
truedivsi 6202031
affsi 6439479
mulrs 7181596
fractor 7376930
gc_NULL 7961632
cmpir 9455018
ugcdiu 10147650
affectsign_safe 10729086
uabsdiviu_rem 11892741
cmpiu 12180867
cmpui 12181017
addrs 12305113
smodss 12582296
rdivii 13103439
rdiviiz 13146058
mpabs_shallow 13428463
utor 13463078
affur 13463183
divii 14051048
mod8 15579388
subrs 16478054
dvdii 16903739
Fl_halve 18824845
modis 19638526
int_bit 20962046
smodis 21176081
evalvalser 21529069
hammingu 24048730
abscmpiu 32682914
abscmpui 32682975
mulri 38033883
mpexpo 38877914
absequaliu 39352549
absequalui 41101466
itos_or_0 43601313
Mod4 43858886
modsi 45225717
affui 45473824
Fl_div 46571961
stack_malloc 46825597
umodi2n 49002502
sdivsi_rem 51430043
gc_ulong 52079652
affrr_fixlg 54656065
truedivii 54669519
stack_malloc_align 55527028
gc_bool 56143933
absi_shallow 56649199
mod2 61229704
Fl_addmulmul_pre 64699961
minuu 69605862
remlll_pre 76061295
evalprecp 78674864
evalvalp 81631471
mpsqr 91051163
Fl_triple 91222963
addiu 97324580
Fl_sqr 99471233
addui 100972133
fixlg 104202370
mod2BIL 106067039
mpodd 115174465
icopyspec 117468059
real_1 129844824
subiu 131922482
subui 136896942
mpshift 153295740
togglesign_safe 157198380
dvmduBIL 161342542
shiftr 178081435
itou 178236436
gc_double 184140041
addis 184506058
vali 190427318
varncmp 198517154
gc_long 242535510
mpsub 251608731
rtor 295304906
utoineg 297193281
cgetineg 298053672
addsi 309691395
muliu 375521102
Fl_double 453085853
shiftr_inplace 464487723
mulis 467006088
itos 472221484
real_0_bit 480001622
addir 481428840
affsr 486269337
stor 486583809
mpadd 575027457
negi 640338303
itor 715166082
Fl_neg 723758551
umodsu 734177041
expu 775702980
stoi 796741740
lg2prec 800252640
mpmul 838297078
rcopy 903451448
mpneg 920325738
affii 957361098
subrr 1000331172
cgetg_copy 1487228840
cmpuu 1490441061
cgetr 1840773818
togglesign 1943462577
minss 2009284366
absi 2065914808
mpabs 2136801155
Fl_sqr_pre 2155901385
setabssign 2203492321
nbits2lg 2367567036
expi 2421779594
Fl_mul 2429228423
addrr 2878267889
remii 3018546742
adduu 3443938338
stackdummy 3653201993
Fl_mul_pre 4088784795
Fl_add 4397301905
leafcopy 4978571679
shift_right 5632832364
dvmdsBIL 7030648174
Fl_sub 7227322488
Fl_addmul_pre 7669924227
subii 7682476200
shift_left 7693775399
uutoi 8925806275
icopy 9058181727
maxss 9711752685
utoi 12039281791
addii 12540764880
evalexpo 13160752253
utoipos 14250744922
gc_const 15582774303
cgetipos 16413606667
cgetg 24518451997
cgeti 27267178478
new_chunk 93532164059
evallg 95352542936
set_avma 129509130045

Generated by: LCOV version 1.16