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 30558-88b7dc3357) Lines: 605 680 89.0 %
Date: 2025-11-27 09:21:46 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 43854
sdivsi 102149
stack_calloc 110590
gc_stoi 155883
dvdui 167195
subis 170993
mod16 241356
Fl_ellj_pre 242646
truedivis 266826
mindd 270158
cmpri 282310
Mod32 311108
uutoineg 355774
Mod16 389733
cgetg_block 408353
gc_utoi 468648
dvdiu 576569
mpdiv 667723
cmpsr 796092
rdivss 839647
real2n 1067418
addri 1109255
gc_utoipos 1153865
real_0 1156739
equalis 1181783
equalsi 1181965
mpround 1216542
absrnz_equal2n 1292601
umodui 1296416
cmpss 1427033
Mod8 2073851
mpcmp 2227505
udivuu_rem 2416419
Mod2 2479131
gc_int 2574328
mulru 2765892
subir 3006710
equaliu 3018569
equalui 3018570
itou_or_0 3041672
maxdd 3182753
cmpis 3634887
negr 3671091
ceildivuu 3848154
cmpsi 3866885
Fl_center 4486496
absrnz_equal1 4519637
real_1_bit 4706400
maxuu 4814887
mod4 4932561
umuluu_or_0 5532421
umuluu_le 5803291
subri 6091931
subsi 6117475
truedivsi 6202031
affsi 6383546
mulrs 7181596
fractor 7376749
gc_NULL 7971188
cmpir 9440566
ugcdiu 10077670
cmpui 10119633
cmpiu 10119684
affectsign_safe 10737327
uabsdiviu_rem 11892741
addrs 12304867
smodss 12542599
rdivii 13099455
rdiviiz 13142143
mod8 13271485
mpabs_shallow 13428463
utor 13463362
affur 13463467
divii 14050691
subrs 16476766
dvdii 16555804
Fl_halve 18026825
modis 19638526
smodis 21176060
evalvalser 21527935
int_bit 22310169
hammingu 24048614
abscmpui 33518558
abscmpiu 33518633
mulri 38034029
mpexpo 38857148
absequaliu 39660810
absequalui 41409753
itos_or_0 43598068
Mod4 43773741
modsi 45225515
affui 45473825
Fl_div 46556059
stack_malloc 46643667
truedivii 46763432
umodi2n 49025967
sdivsi_rem 51429843
gc_bool 51998282
gc_ulong 52162405
affrr_fixlg 54651606
stack_malloc_align 55489950
absi_shallow 58575127
Fl_addmulmul_pre 60092384
mod2 61154500
minuu 69098279
remlll_pre 75579928
evalprecp 78665800
evalvalp 81623288
mpsqr 90984784
Fl_sqr 94863890
Fl_triple 95174027
addiu 97714980
addui 101364791
mod2BIL 103593691
fixlg 104149174
mpodd 115086766
icopyspec 117029558
togglesign_safe 125484855
real_1 129780586
subiu 131685551
subui 136670532
mpshift 153220685
dvmduBIL 165723681
itou 177093952
shiftr 177977361
addis 181584228
gc_double 184360274
vali 190346286
varncmp 217212748
gc_long 242071559
mpsub 251516025
utoineg 294172158
cgetineg 295029637
rtor 295274982
addsi 306768271
muliu 373446364
itos 461999929
mulis 463150870
shiftr_inplace 463921259
Fl_double 468891573
addir 479867350
real_0_bit 480773479
affsr 486125106
stor 486427434
mpadd 575814983
negi 636696219
itor 713153598
Fl_neg 716680195
umodsu 724198191
stoi 772584693
expu 775361364
lg2prec 798041007
mpmul 838920452
rcopy 902700035
affii 909079177
mpneg 916630452
subrr 1000129735
cgetg_copy 1479808339
cmpuu 1492663417
cgetr 1838435438
togglesign 1910989591
minss 2008389392
absi 2060360271
mpabs 2131157806
Fl_sqr_pre 2155625199
setabssign 2197808904
nbits2lg 2364242282
Fl_mul 2416815667
expi 2453213287
addrr 2877861457
remii 3011955474
adduu 3412942519
stackdummy 3646968646
Fl_mul_pre 4093167037
Fl_add 4388641188
leafcopy 4964482600
shift_right 5624502367
dvmdsBIL 7013993926
Fl_sub 7297960357
subii 7664308803
shift_left 7681800511
Fl_addmul_pre 7688149502
uutoi 8809493684
icopy 9055732894
maxss 9736614298
utoi 11899655800
addii 12406045603
evalexpo 13128543188
utoipos 14143912047
gc_const 15513504470
cgetipos 16306080149
cgetg 24542953448
cgeti 27132590245
new_chunk 93244530076
evallg 95246234704
set_avma 128989535213

Generated by: LCOV version 1.16