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 30540-a74e376001) Lines: 605 680 89.0 %
Date: 2025-11-09 09:22:50 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4383055244
Fl_addmul_pre 7658170216
Fl_addmulmul_pre 60145222
Fl_center 4485470
Fl_div 46534109
Fl_double 470171374
Fl_ellj_pre 242626
Fl_halve 18046817
Fl_mul 2415911239
Fl_mul_pre 4086926978
Fl_neg 716621866
Fl_sqr 94910995
Fl_sqr_pre 2156822236
Fl_sub 7298269342
Fl_triple 95525110
Mod16 389733
Mod2 2479266
Mod32 311108
Mod4 43769827
Mod64 0
Mod8 2073879
abscmpiu 33116315
abscmpui 33116382
absequaliu 39660869
absequalui 41409750
absi 2060424088
absi_shallow 58169977
absr 140
absrnz_equal1 4518127
absrnz_equal2n 1291363
addii 12407164465
addir 479823900
addis 181585571
addiu 96916003
addri 1109300
addrr 2877012540
addrs 12303337
addsi 306769407
addss 25067
addui 100565786
adduu 3412629359
affectsign 0
affectsign_safe 10737278
affii 909108716
affrr_fixlg 54637968
affsi 6383327
affsr 485965202
affui 45473824
affur 13462467
ceildivuu 3846039
cgetg 24539242944
cgetg_block 408207
cgetg_copy 1479746581
cgeti 27130014293
cgetineg 295018715
cgetipos 16305244325
cgetr 1838141890
cgetr_block 43644
cmpir 9440330
cmpis 3633614
cmpiu 10119747
cmpri 282310
cmprs 40996
cmpsi 3865593
cmpsr 795890
cmpss 1427033
cmpui 10119779
cmpuu 1492833920
divii 14051409
divsi_rem 0
divss 0
divss_rem 0
dvdii 16552415
dvdiiz 0
dvdis 33912
dvdisz 0
dvdiu 576572
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7013993209
dvmdsi 0
dvmdss 0
dvmduBIL 165740554
equalis 1181585
equaliu 3018661
equalsi 1181810
equalui 3018662
evalexpo 13126317154
evallg 95224164713
evalprecp 78669094
evalvalp 81626201
evalvalser 21443044
expi 2453221124
expu 775168028
fixlg 104135712
fractor 7376005
gc_NULL 7969894
gc_bool 51992501
gc_const 15514548375
gc_double 184356830
gc_int 2574291
gc_long 242065833
gc_stoi 155881
gc_ulong 52183005
gc_utoi 468631
gc_utoipos 1153849
get_avma 0
hammingu 24045860
icopy 9056268723
icopyspec 117026534
int_bit 22271939
itor 713065020
itos 461982038
itos_or_0 43595257
itou 177094192
itou_or_0 3041672
leafcopy 4964600235
lg2prec 797830521
maxdd 3176359
maxss 9734902967
maxuu 4804736
mindd 270161
minss 2008792866
minuu 69139171
mod16 241352
mod2 61155317
mod2BIL 103595646
mod32 259
mod4 4932727
mod64 0
mod8 13272107
modis 19638526
modsi 45225490
modss 0
mpabs 2131217894
mpabs_shallow 13428463
mpadd 575763936
mpceil 0
mpcmp 2227493
mpcopy 665
mpdiv 667721
mpexpo 38849924
mpfloor 0
mpmul 838815970
mpneg 916646001
mpodd 115088025
mpround 1216546
mpshift 153189058
mpsqr 90967692
mpsub 251438393
mptrunc 49
mulis 463154849
muliu 373414634
mulri 38032984
mulrs 7181596
mulru 2765822
nbits2lg 2363754237
negi 636722449
negr 3668562
new_chunk 93249238533
rcopy 902622223
rdivii 13099896
rdiviiz 13144765
rdivis 0
rdivsi 0
rdivss 839647
real2n 1067408
real_0 1156110
real_0_bit 480829422
real_1 129741139
real_1_bit 4706086
real_m1 455
real_m2n 126
remii 3013310000
remis 0
remlll_pre 75609970
remsi 0
remss 0
rtor 295213866
sdivsi 102149
sdivsi_rem 51429818
sdivss_rem 0
set_avma 128989317697
setabssign 2197902723
shift_left 7682489938
shift_right 5625898725
shiftl 0
shiftlr 0
shiftr 177917384
shiftr_inplace 463911519
smodis 21176263
smodss 12520339
stack_calloc 110586
stack_calloc_align 3307
stack_malloc 46641031
stack_malloc_align 55483393
stackdummy 3644833317
stoi 772687893
stor 486262017
subii 7664607220
subir 3006704
subis 170994
subiu 131675466
subri 6081955
subrr 1000084627
subrs 16475165
subsi 6117454
subss 25067
subui 136660417
subuu 25067
thuemorseu 2851
togglesign 1910897480
togglesign_safe 125517439
truedivii 46776680
truedivis 266822
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 16693
udivuu_rem 2416391
ugcdiu 10082518
ugcdui 2737
umodi2n 49022194
umodsu 724175032
umodui 1296416
umuluu_le 5803235
umuluu_or_0 5508964
utoi 11903554814
utoineg 294161629
utoipos 14146939775
utor 13462358
uutoi 8810800935
uutoineg 355595
vali 190342084
varncmp 217203865
varnmax 203
varnmin 15547

Generated by: LCOV version 1.16