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 30536-6f6fcf9613) Lines: 605 680 89.0 %
Date: 2025-11-01 09:21:23 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_add 4354084378
Fl_addmul_pre 7651307020
Fl_addmulmul_pre 60117704
Fl_center 4485590
Fl_div 46527200
Fl_double 474701296
Fl_ellj_pre 242641
Fl_halve 18032793
Fl_mul 2415289099
Fl_mul_pre 4084329245
Fl_neg 716518762
Fl_sqr 94881954
Fl_sqr_pre 2163407911
Fl_sub 7313799851
Fl_triple 95772234
Mod16 389733
Mod2 2479841
Mod32 311108
Mod4 43780532
Mod64 0
Mod8 2075129
abscmpiu 33867689
abscmpui 33867746
absequaliu 39663125
absequalui 41412023
absi 2060310658
absi_shallow 58924377
absr 140
absrnz_equal1 4518129
absrnz_equal2n 1291361
addii 12406117083
addir 479843099
addis 181578195
addiu 98184237
addri 1109246
addrr 2876073566
addrs 12303412
addsi 306762101
addss 25067
addui 101833944
adduu 3413300680
affectsign 0
affectsign_safe 10735959
affii 909028645
affrr_fixlg 54637835
affsi 6383307
affsr 485926538
affui 45473824
affur 13462351
ceildivuu 3849528
cgetg 24542130215
cgetg_block 393710
cgetg_copy 1479704275
cgeti 27121182708
cgetineg 295010802
cgetipos 16302857095
cgetr 1838175738
cgetr_block 43604
cmpir 9428495
cmpis 3633585
cmpiu 10118634
cmpri 282310
cmprs 40996
cmpsi 3865558
cmpsr 795893
cmpss 1427033
cmpui 10118676
cmpuu 1493003679
divii 14060591
divsi_rem 0
divss 0
divss_rem 0
dvdii 16551567
dvdiiz 0
dvdis 33912
dvdisz 0
dvdiu 576571
dvdiuz 0
dvdsi 371
dvdui 167195
dvmdis 0
dvmdsBIL 7012342744
dvmdsi 0
dvmdss 0
dvmduBIL 165719117
equalis 1181645
equaliu 3018648
equalsi 1181827
equalui 3018651
evalexpo 13125392628
evallg 95232192674
evalprecp 78667830
evalvalp 81625102
evalvalser 21443044
expi 2452839497
expu 775132463
fixlg 104135464
fractor 7376011
gc_NULL 7968607
gc_bool 51989954
gc_const 15512953844
gc_double 184384735
gc_int 2574279
gc_long 241813192
gc_stoi 155883
gc_ulong 52168618
gc_utoi 468542
gc_utoipos 1153838
get_avma 0
hammingu 24045795
icopy 9055037775
icopyspec 117026883
int_bit 22276198
itor 713186059
itos 461690361
itos_or_0 43595428
itou 177092505
itou_or_0 3041663
leafcopy 4964245185
lg2prec 797864256
maxdd 3176177
maxss 9744650944
maxuu 4804819
mindd 270158
minss 2008295145
minuu 69072424
mod16 241353
mod2 61152651
mod2BIL 103359734
mod32 259
mod4 4700744
mod64 0
mod8 13271098
modis 19638526
modsi 45225527
modss 0
mpabs 2131081392
mpabs_shallow 13428463
mpadd 574372812
mpceil 0
mpcmp 2227492
mpcopy 665
mpdiv 667712
mpexpo 38856668
mpfloor 0
mpmul 837507290
mpneg 916660174
mpodd 115081724
mpround 1216550
mpshift 153177593
mpsqr 90979409
mpsub 251544654
mptrunc 49
mulis 463120497
muliu 373364530
mulri 38033054
mulrs 7181596
mulru 2765822
nbits2lg 2362055709
negi 636742490
negr 3668406
new_chunk 93232629034
rcopy 902604615
rdivii 13098159
rdiviiz 13143124
rdivis 0
rdivsi 0
rdivss 839647
real2n 1067401
real_0 1156096
real_0_bit 479107508
real_1 129776195
real_1_bit 4706007
real_m1 455
real_m2n 126
remii 3011772437
remis 0
remlll_pre 75458095
remsi 0
remss 0
rtor 295209961
sdivsi 102151
sdivsi_rem 51429855
sdivss_rem 0
set_avma 128983511671
setabssign 2197759640
shift_left 7681034441
shift_right 5624149299
shiftl 0
shiftlr 0
shiftr 177925388
shiftr_inplace 463707496
smodis 21176263
smodss 12500007
stack_calloc 110572
stack_calloc_align 3307
stack_malloc 46641451
stack_malloc_align 55492497
stackdummy 3648340730
stoi 772623770
stor 486244836
subii 7663224890
subir 3006707
subis 170994
subiu 131675210
subri 6135252
subrr 1000111322
subrs 16475222
subsi 6117259
subss 25067
subui 136368847
subuu 25067
thuemorseu 2851
togglesign 1911032935
togglesign_safe 125493926
truedivii 46789219
truedivis 266813
truedivsi 6202031
uabsdiviu_rem 11892741
uabsdivui_rem 16693
udivuu_rem 2416391
ugcdiu 10081913
ugcdui 2737
umodi2n 49036299
umodsu 724229228
umodui 1296416
umuluu_le 5803235
umuluu_or_0 5513285
utoi 11898284622
utoineg 294153468
utoipos 14142462148
utor 13462245
uutoi 8807610171
uutoineg 355023
vali 190340250
varncmp 217203621
varnmax 203
varnmin 15547

Generated by: LCOV version 1.16