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-08-15 17:02:54 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 6561519659
Fl_addmul_pre 8205565349
Fl_addmulmul_pre 74211424
Fl_center 4490059
Fl_div 49581353
Fl_double 521619649
Fl_ellj_pre 242716
Fl_halve 20604957
Fl_mul 2551531184
Fl_mul_pre 4448714363
Fl_neg 741562425
Fl_sqr 108115541
Fl_sqr_pre 2568103943
Fl_sub 7709071619
Fl_triple 100165434
Mod16 389809
Mod2 3595514
Mod32 311157
Mod4 50718975
Mod64 0
Mod8 3309346
abscmpiu 33534405
abscmpui 33534405
absequaliu 45906172
absequalui 47655942
absi 2076460290
absi_shallow 61597959
absr 20510
absrnz_equal1 4559224
absrnz_equal2n 1580223
addii 13115454816
addir 490340776
addis 195801248
addiu 103816589
addri 1113223
addrr 3032586280
addrs 12387597
addsi 320989966
addss 25081
addui 107891160
adduu 3542666893
affectsign 0
affectsign_safe 10754891
affii 1002981224
affrr_fixlg 56699207
affsi 6484770
affsr 509053161
affui 47976646
affur 13344767
ceildivuu 3916770
cgetg 28034801077
cgetg_block 430408
cgetg_copy 1490907748
cgeti 28638383809
cgetineg 301591275
cgetipos 16904123917
cgetr 192135538
cgetr_block 44721
cmpir 1730010
cmpis 6119306
cmpiu 13000195
cmpri 303856
cmprs 40996
cmpsi 6351305
cmpsr 796228
cmpss 1416201
cmpui 13000195
cmpuu 318396336
divii 16299032
divmpr 3759
divrmp 1203052
divsi_rem 0
divss 0
divss_rem 0
dvdii 17072403
dvdiiz 0
dvdis 33765
dvdisz 0
dvdiu 576287
dvdiuz 0
dvdsi 371
dvdui 167545
dvmdis 0
dvmdsBIL 7387226371
dvmdsi 0
dvmdss 0
dvmduBIL 170507039
equalis 1149746
equaliu 3042339
equalsi 1149928
equalui 3042339
evalexpo 13971335128
evallg 100091015883
evalprecp 78703542
evalvalp 81660145
evalvalser 25309350
expi 2476536882
expu 955678938
fixlg 106530559
fractor 7387948
fractor_lg 7389439
gc_NULL 7911980
gc_bool 55261962
gc_const 15930252397
gc_double 198969854
gc_int 2818782
gc_long 243061012
gc_stoi 155904
gc_ulong 52329636
gc_utoi 467783
gc_utoipos 1155325
get_avma 0
hammingu 24078742
icopy 9395663922
icopyspec 120486428
int_bit 21015730
itor 451882210
itor_lg 739838246
itos 477849879
itos_or_0 44914236
itou 180921936
itou_or_0 5015383
leafcopy 5279206609
lg2prec 30275830
maxdd 3218088
maxss 7491800963
maxuu 6603110
mindd 265750
minss 2044959562
minuu 57568285
mod16 308662
mod2 65902721
mod2BIL 113535923
mod32 259
mod4 7594956
mod64 0
mod8 15673609
modis 19638526
modsi 45242143
modss 0
mpabs 2118530823
mpabs_shallow 13428274
mpadd 599834771
mpceil 0
mpcmp 2164525
mpcopy 665
mpdiv 0
mpexpo 37845523
mpfloor 0
mpmul 891408495
mpneg 952047017
mpodd 118265643
mpround 1216171
mpshift 153966112
mpsqr 91858363
mpsub 273985453
mptrunc 49
mulis 470856925
muliu 378881191
mulri 53835790
mulrs 7181596
mulru 2765059
nbits2lg 1677876463
negi 661628467
negr 3961190
new_chunk 98658584117
newblock 857705
rcopy 1101916000
rdivii 5744744
rdivii_lg 13134309
rdiviiz 13173936
rdivis 0
rdivsi 0
rdivss 839647
real2n 1070088
real_0 1160900
real_0_bit 501081636
real_1 133392530
real_1_bit 4699130
real_m1 455
real_m2n 126
remii 3104090886
remis 0
remlll_pre 79167995
remsi 0
remss 0
rtor 308820663
rtor_lg 308825017
sdivsi 102165
sdivsi_rem 51446757
sdivss_rem 0
set_avma 136047676575
setabssign 2187194506
shift_left 7847729392
shift_right 5947800597
shiftl 0
shiftlr 0
shiftr 363948056
shiftr_inplace 472695776
smodis 21176116
smodss 13998082
stack_calloc 110628
stack_calloc_align 3325
stack_malloc 46736502
stack_malloc_align 55670147
stackdummy 3743990719
stoi 776330588
stor 2140784
stor_lg 509053161
subii 8008806639
subir 3030801
subis 171754
subiu 133455144
subri 1538272
subrr 1062988844
subrs 16573235
subsi 6244790
subss 25081
subui 138450476
subuu 25081
thuemorseu 3311
togglesign 1996630297
togglesign_safe 157546307
truedivii 54901637
truedivis 268438
truedivsi 6202318
uabsdiviu_rem 26737503
uabsdivui_rem 128885
udivuu_rem 2418435
ugcdiu 10312796
ugcdui 2737
umodi2n 58324899
umodsu 734405677
umodui 710986
umuluu_le 7618608
umuluu_or_0 6349300
utoi 12431102919
utoineg 300668514
utoipos 14665164501
utor 13344627
utor_lg 13344627
uutoi 9226859190
uutoineg 365874
vali 194748840
varncmp 218513211
varnmax 203
varnmin 26180

Generated by: LCOV version 2.0-1