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 30569-8181146aa1) Lines: 605 680 89.0 %
Date: 2025-12-03 09:22:05 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 43833
sdivsi 102147
stack_calloc 110580
gc_stoi 155881
dvdui 167195
subis 170991
mod16 241354
Fl_ellj_pre 242611
truedivis 267036
mindd 270167
cmpri 282310
Mod32 311108
uutoineg 355390
Mod16 389733
cgetg_block 408505
gc_utoi 468704
dvdiu 576581
mpdiv 667731
cmpsr 796100
rdivss 839647
real2n 1067464
addri 1109356
gc_utoipos 1153867
real_0 1156791
equalis 1182032
equalsi 1182215
mpround 1216594
absrnz_equal2n 1292788
umodui 1296416
cmpss 1427033
Mod8 2073895
mpcmp 2227706
udivuu_rem 2416426
Mod2 2479159
gc_int 2574313
mulru 2765892
subir 3006709
equaliu 3018581
equalui 3018582
itou_or_0 3041672
maxdd 3183666
cmpis 3634950
negr 3671466
cmpsi 3866963
ceildivuu 3906829
Fl_center 4486496
absrnz_equal1 4520952
real_1_bit 4706173
maxuu 4815364
mod4 4932718
umuluu_or_0 5560187
umuluu_le 5803291
subsi 6117163
subri 6118852
truedivsi 6202031
affsi 6383408
mulrs 7181596
fractor 7376765
gc_NULL 7972011
cmpir 9433363
ugcdiu 10105708
cmpui 10119186
cmpiu 10119270
affectsign_safe 10736834
uabsdiviu_rem 11892741
addrs 12307048
smodss 12481247
rdivii 13097766
rdiviiz 13140601
mod8 13271191
mpabs_shallow 13428463
utor 13463433
affur 13463526
divii 14055769
subrs 16479070
dvdii 16560784
Fl_halve 18023032
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22318136
hammingu 24048654
abscmpui 34389910
abscmpiu 34390018
mulri 38034072
mpexpo 38882812
absequaliu 39660751
absequalui 41409687
itos_or_0 43597326
Mod4 43779007
modsi 45225545
affui 45473825
Fl_div 46439800
stack_malloc 46645616
truedivii 47031158
umodi2n 49031353
sdivsi_rem 51429872
gc_bool 52011124
gc_ulong 52162648
affrr_fixlg 54655193
stack_malloc_align 55510167
absi_shallow 59452682
Fl_addmulmul_pre 60097247
mod2 61159643
minuu 69191172
remlll_pre 75533914
evalprecp 78668425
evalvalp 81624716
mpsqr 91034916
Fl_sqr 94872702
Fl_triple 94966539
addiu 99467885
addui 103117699
mod2BIL 103598337
fixlg 104153070
mpodd 115097449
icopyspec 117100090
togglesign_safe 125684106
real_1 129821466
subiu 131692447
subui 136677346
mpshift 153205630
dvmduBIL 165649112
itou 177608851
shiftr 178004595
addis 181616494
gc_double 184372820
vali 190484270
varncmp 217214632
gc_long 242317160
mpsub 251565612
utoineg 294389117
cgetineg 295246584
rtor 295280493
addsi 306801810
muliu 373610575
itos 462327470
shiftr_inplace 463854858
mulis 464519459
Fl_double 468237412
real_0_bit 479249589
addir 480563612
affsr 486167788
stor 486462075
mpadd 574467504
negi 636884453
itor 713566154
Fl_neg 716212554
umodsu 724172556
stoi 772621502
expu 775498611
lg2prec 798343590
mpmul 837645171
rcopy 903213674
affii 910009370
mpneg 916818419
subrr 1000160923
cgetg_copy 1480418527
cmpuu 1492715998
cgetr 1838974919
togglesign 1912363461
minss 2008662583
absi 2067599252
mpabs 2138382298
Fl_sqr_pre 2154841210
setabssign 2205056431
nbits2lg 2363373737
Fl_mul 2417417157
expi 2453631285
addrr 2876732748
remii 3011980112
adduu 3416833799
stackdummy 3652125213
Fl_mul_pre 4092194590
Fl_add 4382959438
leafcopy 4973598248
shift_right 5625934584
dvmdsBIL 7015209884
Fl_sub 7321352177
subii 7665282037
shift_left 7683918157
Fl_addmul_pre 7684090541
uutoi 8816412740
icopy 9057124677
maxss 9762814684
utoi 11910528566
addii 12413121185
evalexpo 13130797525
utoipos 14157529842
gc_const 15519282524
cgetipos 16321190788
cgetg 24556596500
cgeti 27146615676
new_chunk 93289480021
evallg 95288460408
set_avma 129052801932

Generated by: LCOV version 1.16