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

Generated by: LCOV version 1.16