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-09-07 17:02:37 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 6562882171
Fl_addmul_pre 8209249280
Fl_addmulmul_pre 74215825
Fl_center 4490059
Fl_div 49583797
Fl_double 521841551
Fl_ellj_pre 242740
Fl_halve 20604818
Fl_mul 2552374846
Fl_mul_pre 4453342700
Fl_neg 741571417
Fl_sqr 108120335
Fl_sqr_pre 2569499147
Fl_sub 7710325674
Fl_triple 100276025
Mod16 389809
Mod2 3595514
Mod32 311157
Mod4 50720465
Mod64 0
Mod8 3309346
abscmpiu 33950488
abscmpui 33950488
absequaliu 45906166
absequalui 47655936
absi 2076486641
absi_shallow 62014193
absr 20510
absrnz_equal1 4559221
absrnz_equal2n 1580189
addii 13116649965
addir 490364257
addis 195802139
addiu 104649367
addri 1113223
addrr 3030895540
addrs 12387752
addsi 320990857
addss 25081
addui 108723937
adduu 3543614874
affectsign 0
affectsign_safe 10755183
affii 1002972212
affrr_fixlg 56699504
affsi 6484781
affsr 509054366
affui 47976646
affur 13344762
ceildivuu 3918162
cgetg 28036089844
cgetg_block 430408
cgetg_copy 1490916124
cgeti 28645917980
cgetineg 301598991
cgetipos 16906250860
cgetr 192136444
cgetr_block 44724
cmpir 1730025
cmpis 6119302
cmpiu 13001179
cmpri 303857
cmprs 40996
cmpsi 6351301
cmpsr 796228
cmpss 1416201
cmpui 13001179
cmpuu 318404397
divii 16305380
divmpr 3759
divrmp 1203052
divsi_rem 0
divss 0
divss_rem 0
dvdii 17072624
dvdiiz 0
dvdis 33765
dvdisz 0
dvdiu 576287
dvdiuz 0
dvdsi 371
dvdui 167545
dvmdis 0
dvmdsBIL 7387605059
dvmdsi 0
dvmdss 0
dvmduBIL 173067155
equalis 1149729
equaliu 3042337
equalsi 1149911
equalui 3042337
evalexpo 13969731624
evallg 100105820226
evalprecp 78703538
evalvalp 81660141
evalvalser 25309350
expi 2476548793
expu 955695959
fixlg 106530804
fractor 7387949
fractor_lg 7389440
gc_NULL 7911531
gc_bool 55262672
gc_const 15931493138
gc_double 199000361
gc_int 2818775
gc_long 243066946
gc_stoi 155898
gc_ulong 52330007
gc_utoi 467847
gc_utoipos 1155321
get_avma 0
hammingu 24078747
icopy 9396023697
icopyspec 120487090
int_bit 21041689
itor 451910586
itor_lg 739877224
itos 477898482
itos_or_0 44914242
itou 180921684
itou_or_0 5015381
leafcopy 5280113377
lg2prec 30274129
maxdd 3218298
maxss 7492759145
maxuu 6603107
mindd 265753
minss 2044942006
minuu 57540931
mod16 308662
mod2 65902572
mod2BIL 113537188
mod32 259
mod4 7594956
mod64 0
mod8 15674957
modis 19638526
modsi 45242198
modss 0
mpabs 2118560238
mpabs_shallow 13428274
mpadd 598007643
mpceil 0
mpcmp 2164546
mpcopy 665
mpdiv 0
mpexpo 37845927
mpfloor 0
mpmul 889562087
mpneg 952022807
mpodd 118265538
mpround 1216191
mpshift 153971081
mpsqr 91849112
mpsub 273975559
mptrunc 49
mulis 470855040
muliu 379031607
mulri 53835782
mulrs 7181596
mulru 2765059
nbits2lg 1676191570
negi 661589054
negr 3961201
new_chunk 98667703907
newblock 857708
rcopy 1101973228
rdivii 5744753
rdivii_lg 13134319
rdiviiz 13173946
rdivis 0
rdivsi 0
rdivss 839647
real2n 1070090
real_0 1160882
real_0_bit 499038846
real_1 133394085
real_1_bit 4699135
real_m1 455
real_m2n 126
remii 3105348876
remis 0
remlll_pre 79167996
remsi 0
remss 0
rtor 308825171
rtor_lg 308829525
sdivsi 102165
sdivsi_rem 51446812
sdivss_rem 0
set_avma 136062557622
setabssign 2187224929
shift_left 7847869234
shift_right 5947978375
shiftl 0
shiftlr 0
shiftr 363964258
shiftr_inplace 472698824
smodis 21176116
smodss 13998082
stack_calloc 110646
stack_calloc_align 3325
stack_malloc 46736597
stack_malloc_align 55671361
stackdummy 3747496717
stoi 776279332
stor 2140785
stor_lg 509054366
subii 8009772316
subir 3030807
subis 171754
subiu 133454074
subri 1538285
subrr 1062992248
subrs 16573400
subsi 6245137
subss 25081
subui 138449403
subuu 25081
thuemorseu 3311
togglesign 1996645269
togglesign_safe 157553482
truedivii 54936212
truedivis 268440
truedivsi 6202318
uabsdiviu_rem 26737503
uabsdivui_rem 128885
udivuu_rem 2418435
ugcdiu 10312787
ugcdui 2737
umodi2n 58326389
umodsu 734435083
umodui 710986
umuluu_le 7618608
umuluu_or_0 6327425
utoi 12433210161
utoineg 300676231
utoipos 14667307022
utor 13344622
utor_lg 13344622
uutoi 9228086073
uutoineg 365874
vali 194756339
varncmp 218513252
varnmax 203
varnmin 26180

Generated by: LCOV version 2.0-1