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) Coverage Total Hit
Test: PARI/GP v2.19.0 lcov report (development 31092-e6893b0017) Lines: 88.6 % 690 611
Test Date: 2026-11-14 17:03:41 Functions: 89.9 % 247 222
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
Fl_add 6560882488
Fl_addmul_pre 8205432763
Fl_addmulmul_pre 74210743
Fl_center 4490059
Fl_div 49577693
Fl_double 521425871
Fl_ellj_pre 242714
Fl_halve 20602879
Fl_mul 2551532857
Fl_mul_pre 4448267328
Fl_neg 741525530
Fl_sqr 108108937
Fl_sqr_pre 2567792303
Fl_sub 7707841927
Fl_triple 100099557
Mod16 389809
Mod2 3595514
Mod32 311157
Mod4 50721225
Mod64 0
Mod8 3309346
abscmpiu 33534298
abscmpui 33534298
absequaliu 45906132
absequalui 47655902
absi 2076482889
absi_shallow 61598019
absr 20510
absrnz_equal1 4559172
absrnz_equal2n 1580226
addii 13116249217
addir 490369752
addis 195797344
addiu 103816648
addri 1113221
addrr 3030757420
addrs 12387633
addsi 320986062
addss 25081
addui 107891220
adduu 3542633844
affectsign 0
affectsign_safe 10755795
affii 1002918406
affrr_fixlg 56699320
affsi 6484756
affsr 509053165
affui 47976646
affur 13344755
ceildivuu 3915413
cgetg 28030853000
cgetg_block 430398
cgetg_copy 1490907356
cgeti 28639824842
cgetineg 301593228
cgetipos 16903834202
cgetr 192136326
cgetr_block 44720
cmpir 1730022
cmpis 6119269
cmpiu 13000761
cmpri 303857
cmprs 40996
cmpsi 6351268
cmpsr 796228
cmpss 1416201
cmpui 13000761
cmpuu 318401017
divii 16306580
divmpr 3759
divrmp 1203052
divsi_rem 0
divss 0
divss_rem 0
dvdii 17072267
dvdiiz 0
dvdis 33765
dvdisz 0
dvdiu 576287
dvdiuz 0
dvdsi 371
dvdui 167545
dvmdis 0
dvmdsBIL 7387288865
dvmdsi 0
dvmdss 0
dvmduBIL 172959815
equalis 1149718
equaliu 3042322
equalsi 1149900
equalui 3042322
evalexpo 13969659971
evallg 100089904823
evalprecp 78703504
evalvalp 81660107
evalvalser 25309350
expi 2476211458
expu 955683115
fixlg 106530598
fractor 7387947
fractor_lg 7389438
gc_NULL 7912117
gc_bool 55260705
gc_const 15930670109
gc_double 198999719
gc_int 2818780
gc_long 243066326
gc_stoi 155904
gc_ulong 52322730
gc_utoi 467858
gc_utoipos 1155332
get_avma 0
hammingu 24078683
icopy 9395663038
icopyspec 120486865
int_bit 21029101
itor 451924300
itor_lg 739890274
itos 477909970
itos_or_0 44914228
itou 180921151
itou_or_0 5015365
leafcopy 5280118805
lg2prec 30273733
maxdd 3218198
maxss 7491868435
maxuu 6603111
mindd 265750
minss 2044608556
minuu 56854660
mod16 308664
mod2 65901399
mod2BIL 113535083
mod32 259
mod4 7594949
mod64 0
mod8 15674146
modis 19638526
modsi 45242169
modss 0
mpabs 2118555403
mpabs_shallow 13428274
mpadd 597874841
mpceil 0
mpcmp 2164541
mpcopy 665
mpdiv 0
mpexpo 37846841
mpfloor 0
mpmul 889470060
mpneg 952063858
mpodd 118263385
mpround 1216188
mpshift 153966366
mpsqr 91852355
mpsub 274015144
mptrunc 49
mulis 470866238
muliu 378952738
mulri 53835788
mulrs 7181596
mulru 2765059
nbits2lg 1675916942
negi 661636848
negr 3961186
new_chunk 98654744659
newblock 857684
rcopy 1101971829
rdivii 5744741
rdivii_lg 13134305
rdiviiz 13173932
rdivis 0
rdivsi 0
rdivss 839647
real2n 1070089
real_0 1160889
real_0_bit 498836360
real_1 133393179
real_1_bit 4699125
real_m1 455
real_m2n 126
remii 3104322230
remis 0
remlll_pre 79167991
remsi 0
remss 0
rtor 308822426
rtor_lg 308826780
sdivsi 102165
sdivsi_rem 51446783
sdivss_rem 0
set_avma 136041966663
setabssign 2187220613
shift_left 7847940121
shift_right 5948042241
shiftl 0
shiftlr 0
shiftr 363957536
shiftr_inplace 472697269
smodis 21176116
smodss 13998082
stack_calloc 110620
stack_calloc_align 3325
stack_malloc 46736495
stack_malloc_align 55671625
stackdummy 3744853273
stoi 774905009
stor 2140785
stor_lg 509053165
subii 8009156550
subir 3030803
subis 171754
subiu 133456020
subri 1538262
subrr 1063018492
subrs 16573319
subsi 6244723
subss 25081
subui 138451333
subuu 25081
thuemorseu 3311
togglesign 1996682939
togglesign_safe 157551717
truedivii 54942598
truedivis 268430
truedivsi 6202318
uabsdiviu_rem 26737503
uabsdivui_rem 128885
udivuu_rem 2418435
ugcdiu 10312773
ugcdui 2737
umodi2n 58327149
umodsu 734412154
umodui 710986
umuluu_le 7618608
umuluu_or_0 6346164
utoi 12431104223
utoineg 300670470
utoipos 14665062950
utor 13344615
utor_lg 13344615
uutoi 9226992345
uutoineg 365874
vali 194757393
varncmp 218513470
varnmax 203
varnmin 26180

Generated by: LCOV version 2.0-1