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 30483-b6b1f87815) Lines: 605 680 89.0 %
Date: 2025-09-12 09:24:16 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4357890394
Fl_addmul_pre 7644808984
Fl_addmulmul_pre 60063862
Fl_center 4485590
Fl_div 46487708
Fl_double 474182362
Fl_ellj_pre 242618
Fl_halve 18016363
Fl_mul 2415425646
Fl_mul_pre 4078433971
Fl_neg 716452433
Fl_sqr 94843874
Fl_sqr_pre 2162434407
Fl_sub 7296449403
Fl_triple 95587255
Mod16 389733
Mod2 2479841
Mod32 311108
Mod4 44349993
Mod64 0
Mod8 2070250
abscmpiu 33058628
abscmpui 33058639
absequaliu 39650167
absequalui 41399067
absi 2060464253
absi_shallow 58110071
absr 140
absrnz_equal1 4515841
absrnz_equal2n 1288987
addii 12406703395
addir 479726595
addis 181732981
addiu 96510000
addri 1109351
addrr 2881363066
addrs 12304971
addsi 306917417
addss 25067
addui 100159335
adduu 3412272336
affectsign 0
affectsign_safe 10736690
affii 909414743
affrr_fixlg 55797476
affsi 6383184
affsr 495357207
affui 45473825
affur 13460323
ceildivuu 3845698
cgetg 24661406661
cgetg_block 393641
cgetg_copy 1479694877
cgeti 27135121168
cgetineg 295064782
cgetipos 16320578613
cgetr 1856870161
cgetr_block 43589
cmpir 9427945
cmpis 3633687
cmpiu 10116923
cmpri 282310
cmprs 40996
cmpsi 3865657
cmpsr 795896
cmpss 1427033
cmpui 10116717
cmpuu 1492921919
divii 14064412
divsi_rem 0
divss 0
divss_rem 0
dvdii 16463195
dvdiiz 0
dvdis 33912
dvdisz 0
dvdiu 576569
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7089448372
dvmdsi 0
dvmdss 0
dvmduBIL 165637375
equalis 1181633
equaliu 2995638
equalsi 1181816
equalui 2995640
evalexpo 13259954131
evallg 95466837853
evalprecp 78665297
evalvalp 81622057
evalvalser 21443044
expi 2453983300
expu 787000392
fixlg 105292886
fractor 7376327
gc_NULL 7969061
gc_bool 51901916
gc_const 15511766446
gc_double 184411363
gc_int 2574342
gc_long 241795984
gc_stoi 155887
gc_ulong 52139008
gc_utoi 468532
gc_utoipos 1153918
get_avma 0
hammingu 24045715
icopy 9055265179
icopyspec 117008941
int_bit 22261960
itor 713026920
itos 461709746
itos_or_0 43581865
itou 177063547
itou_or_0 3054261
leafcopy 4968983098
lg2prec 807070041
maxdd 3163738
maxss 9732781018
maxuu 4805094
mindd 270151
minss 2008943618
minuu 69000950
mod16 236595
mod2 61146731
mod2BIL 103330383
mod32 259
mod4 4700793
mod64 0
mod8 13271584
modis 19638518
modsi 45225529
modss 0
mpabs 2131705053
mpabs_shallow 13428463
mpadd 574224351
mpceil 0
mpcmp 2227504
mpcopy 665
mpdiv 667715
mpexpo 38856478
mpfloor 0
mpmul 837294585
mpneg 917797694
mpodd 115076588
mpround 1216539
mpshift 153208795
mpsqr 90974532
mpsub 251523897
mptrunc 49
mulis 463156939
muliu 372548867
mulri 38034405
mulrs 7181596
mulru 2765822
nbits2lg 2380740258
negi 637399047
negr 3670224
new_chunk 93444949412
rcopy 905606871
rdivii 13102288
rdiviiz 13145340
rdivis 0
rdivsi 0
rdivss 839647
real2n 1067453
real_0 1156018
real_0_bit 478397724
real_1 131224177
real_1_bit 4705820
real_m1 455
real_m2n 126
remii 3011253186
remis 0
remlll_pre 75467623
remsi 0
remss 0
rtor 300464608
sdivsi 102151
sdivsi_rem 51429856
sdivss_rem 0
set_avma 129285408856
setabssign 2198380599
shift_left 7754179403
shift_right 5671898104
shiftl 0
shiftlr 0
shiftr 180848314
shiftr_inplace 478474963
smodis 21176255
smodss 12493885
stack_calloc 110149
stack_calloc_align 3307
stack_malloc 46631405
stack_malloc_align 55489587
stackdummy 3644918972
stoi 772660421
stor 495659466
subii 7663758348
subir 3006681
subis 170994
subiu 131650440
subri 6128677
subrr 1001030129
subrs 16476640
subsi 6112282
subss 25067
subui 136343924
subuu 25067
thuemorseu 2851
togglesign 1914495030
togglesign_safe 125514280
truedivii 46801702
truedivis 266820
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 16693
udivuu_rem 2416391
ugcdiu 10085795
ugcdui 2737
umodi2n 49601135
umodsu 724155284
umodui 1296415
umuluu_le 5800680
umuluu_or_0 5542027
utoi 11905869258
utoineg 294207023
utoipos 14153623322
utor 13460215
uutoi 8813228030
uutoineg 355543
vali 190292745
varncmp 217201219
varnmax 203
varnmin 15547

Generated by: LCOV version 1.16