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 30530-11e908049b) Lines: 605 680 89.0 %
Date: 2025-10-14 09:22:50 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 33912
cmprs 40996
cgetr_block 43650
sdivsi 102151
stack_calloc 110562
gc_stoi 155883
dvdui 167195
subis 170995
mod16 241354
Fl_ellj_pre 242633
truedivis 266818
mindd 270159
cmpri 282310
Mod32 311108
uutoineg 355422
Mod16 389733
cgetg_block 393710
gc_utoi 468641
dvdiu 576570
mpdiv 667712
cmpsr 795893
rdivss 839647
real2n 1067400
addri 1109162
gc_utoipos 1153836
real_0 1156098
equalis 1181667
equalsi 1181849
mpround 1216544
absrnz_equal2n 1291329
umodui 1296416
cmpss 1427033
Mod8 2075129
mpcmp 2227502
udivuu_rem 2416391
Mod2 2479841
gc_int 2574289
mulru 2765822
subir 3006704
equalui 3018654
equaliu 3018655
itou_or_0 3041664
maxdd 3176119
cmpis 3633543
negr 3670047
ceildivuu 3847010
cmpsi 3865515
Fl_center 4485525
absrnz_equal1 4517940
mod4 4700738
real_1_bit 4705963
maxuu 4804683
umuluu_or_0 5542657
umuluu_le 5803235
subri 6091555
subsi 6117337
truedivsi 6202031
affsi 6383281
mulrs 7181596
fractor 7376018
gc_NULL 7968208
cmpir 9445459
ugcdiu 10082388
cmpiu 10119521
cmpui 10119539
affectsign_safe 10737163
uabsdiviu_rem 11892741
addrs 12303208
smodss 12546749
rdivii 13097410
rdiviiz 13141838
mod8 13271916
mpabs_shallow 13428463
utor 13462544
affur 13462648
divii 14053059
subrs 16475137
dvdii 16549767
Fl_halve 18022060
modis 19638526
smodis 21176263
evalvalser 21443044
int_bit 22299885
hammingu 24045770
abscmpiu 32379642
abscmpui 32379698
mulri 38032958
mpexpo 38855106
absequaliu 39662992
absequalui 41411890
itos_or_0 43595035
Mod4 44368466
modsi 45225552
affui 45473823
Fl_div 46507129
stack_malloc 46641388
truedivii 46775146
umodi2n 49624086
sdivsi_rem 51429879
gc_bool 51988451
gc_ulong 52161267
stack_malloc_align 55489038
affrr_fixlg 55830176
absi_shallow 57436152
Fl_addmulmul_pre 60109389
mod2 61153050
minuu 68921770
remlll_pre 75459820
evalprecp 78667870
evalvalp 81625112
mpsqr 90984108
Fl_sqr 94855103
addiu 95204581
Fl_triple 95678751
addui 98854373
mod2BIL 103359179
fixlg 105327801
mpodd 115082293
icopyspec 117026688
togglesign_safe 125507306
real_1 131245310
subiu 131675995
subui 136369685
mpshift 153167301
dvmduBIL 165756079
itou 177091877
shiftr 181110630
addis 181815401
gc_double 184288116
vali 190340437
varncmp 217203572
gc_long 241814510
mpsub 251494253
utoineg 294166750
cgetineg 295024193
rtor 300589857
addsi 306999456
muliu 373527054
itos 461670677
mulis 463129173
Fl_double 474546781
shiftr_inplace 478391585
addir 479817159
real_0_bit 481159283
affsr 495468194
stor 495781434
mpadd 576143367
negi 637398951
itor 712986302
Fl_neg 716533694
umodsu 724185160
stoi 772542322
expu 787263718
lg2prec 807333513
mpmul 839243886
rcopy 905785767
affii 909049950
mpneg 917800024
subrr 1001180324
cgetg_copy 1479693273
cmpuu 1493009678
cgetr 1857034068
togglesign 1914301872
minss 2008757841
absi 2060286353
mpabs 2131083223
Fl_sqr_pre 2162797017
setabssign 2197760038
nbits2lg 2382867046
Fl_mul 2413077444
expi 2453640977
addrr 2883675423
remii 3012664506
adduu 3410059763
stackdummy 3639202616
Fl_mul_pre 4094323277
Fl_add 4357703246
leafcopy 4968552057
shift_right 5669512269
dvmdsBIL 7088961692
Fl_sub 7290860745
Fl_addmul_pre 7662075357
subii 7665225264
shift_left 7757065888
uutoi 8805744439
icopy 9057937322
maxss 9722685037
utoi 11892591373
addii 12406897991
evalexpo 13268885779
utoipos 14137015260
gc_const 15518373275
cgetipos 16300055602
cgetg 24654712175
cgeti 27132483419
new_chunk 93445807213
evallg 95480388845
set_avma 129300480495

Generated by: LCOV version 1.16