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 30674-be81ecfdd4) Lines: 605 680 89.0 %
Date: 2026-02-10 09:23:17 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 14728
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33709
cmprs 40996
cgetr_block 43799
sdivsi 102150
stack_calloc 110355
gc_stoi 155889
dvdui 167195
subis 170919
Fl_ellj_pre 238068
mod16 241097
mindd 264341
truedivis 266951
cmpri 282310
Mod32 311108
uutoineg 362024
Mod16 389733
cgetg_block 425005
gc_utoi 468616
dvdiu 576269
mpdiv 665627
cmpsr 796104
rdivss 839647
real2n 1067053
addri 1106240
gc_utoipos 1153495
real_0 1156514
equalis 1185451
equalsi 1185633
mpround 1216580
absrnz_equal2n 1292665
umodui 1296276
cmpss 1392943
Mod8 2074168
mpcmp 2226348
Mod2 2370308
udivuu_rem 2418330
gc_int 2631198
mulru 2765892
subir 3005088
equaliu 3018229
equalui 3018230
itou_or_0 3041719
maxdd 3178483
cmpis 3634860
negr 3671450
cmpsi 3866861
ceildivuu 3901218
Fl_center 4486175
absrnz_equal1 4519914
real_1_bit 4705006
maxuu 4815033
mod4 5085053
umuluu_or_0 5526349
umuluu_le 5803291
subsi 6094008
subri 6136284
truedivsi 6202031
affsi 6373317
mulrs 7181596
fractor 7376933
gc_NULL 7962534
cmpir 9431023
ugcdiu 10113790
cmpiu 10132635
cmpui 10132662
affectsign_safe 10728072
uabsdiviu_rem 11892741
addrs 12304995
smodss 12537784
rdivii 13102027
rdiviiz 13144862
mod8 13163161
mpabs_shallow 13428463
utor 13462005
affur 13462121
divii 14053732
subrs 16475862
dvdii 16551879
Fl_halve 18797862
modis 19638526
int_bit 20975525
smodis 21176060
evalvalser 21528999
hammingu 24048421
abscmpiu 33404630
abscmpui 33404814
mulri 38033877
mpexpo 38877237
absequaliu 39398501
absequalui 41147422
itos_or_0 43599014
Mod4 43791031
modsi 45225554
affui 45473825
Fl_div 46550992
stack_malloc 46625305
truedivii 47040535
umodi2n 48935044
sdivsi_rem 51429879
gc_bool 51976618
gc_ulong 52040615
affrr_fixlg 54651331
stack_malloc_align 55501551
absi_shallow 58456932
mod2 61113324
Fl_addmulmul_pre 64607402
minuu 69130482
remlll_pre 75905728
evalprecp 78674684
evalvalp 81632115
mpsqr 91029407
Fl_triple 94546233
Fl_sqr 95866291
addiu 97495976
addui 101140079
mod2BIL 103309397
fixlg 104194230
mpodd 115076079
icopyspec 117433478
togglesign_safe 125533022
real_1 129819778
subiu 131849358
subui 136822225
mpshift 153222231
dvmduBIL 165860951
shiftr 177981078
itou 178274662
addis 181578581
gc_double 184184765
vali 190381601
varncmp 217197909
gc_long 242455118
mpsub 251603813
utoineg 293982958
cgetineg 294844786
rtor 295251655
addsi 306763393
muliu 374594408
itos 462167380
shiftr_inplace 464191160
mulis 466258360
Fl_double 469773283
real_0_bit 479090604
addir 481439289
affsr 486090473
stor 486428670
mpadd 574328228
negi 636794528
itor 714917281
Fl_neg 724009895
umodsu 734126771
stoi 772450979
expu 775395785
lg2prec 799839857
mpmul 837578930
rcopy 903276713
affii 910502891
mpneg 916732759
subrr 1000264964
cgetg_copy 1480357320
cmpuu 1492955698
cgetr 1840382472
togglesign 1912465015
minss 2009750010
absi 2067455072
mpabs 2138235184
Fl_sqr_pre 2176449027
setabssign 2204964009
nbits2lg 2366166127
Fl_mul 2422123875
expi 2448570385
addrr 2877564249
remii 3006791455
adduu 3411173845
stackdummy 3646195553
Fl_mul_pre 4102443177
Fl_add 4404310237
leafcopy 4975576082
shift_right 5632645928
dvmdsBIL 7011053944
Fl_sub 7295243040
subii 7640236340
shift_left 7677019562
Fl_addmul_pre 7686293731
uutoi 8810738801
icopy 9049827386
maxss 9727123748
utoi 11899017911
addii 12404477063
evalexpo 13135108438
utoipos 14147102277
gc_const 15513051100
cgetipos 16317158412
cgetg 24564272607
cgeti 27085526347
new_chunk 93237863488
evallg 95208742938
set_avma 129002517823

Generated by: LCOV version 1.16