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-12-02 17:03:19 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 6561447325
Fl_addmul_pre 8205656196
Fl_addmulmul_pre 74215161
Fl_center 4490059
Fl_div 49578909
Fl_double 521369166
Fl_ellj_pre 242724
Fl_halve 20605436
Fl_mul 2552451207
Fl_mul_pre 4448470984
Fl_neg 741566009
Fl_sqr 108112883
Fl_sqr_pre 2567939985
Fl_sub 7718155232
Fl_triple 100073531
Mod16 389809
Mod2 3595514
Mod32 311157
Mod4 50720127
Mod64 0
Mod8 3309346
abscmpiu 34003364
abscmpui 34003364
absequaliu 45906170
absequalui 47655940
absi 2076471303
absi_shallow 62066963
absr 20510
absrnz_equal1 4559124
absrnz_equal2n 1580255
addii 13115858925
addir 490357478
addis 195799394
addiu 104758997
addri 1113223
addrr 3030528213
addrs 12387476
addsi 320988112
addss 25081
addui 108833567
adduu 3543701903
affectsign 0
affectsign_safe 10755902
affii 1002920703
affrr_fixlg 56699083
affsi 6484694
affsr 509051039
affui 47976646
affur 13344749
ceildivuu 3915988
cgetg 28037345807
cgetg_block 430408
cgetg_copy 1490902077
cgeti 28639792649
cgetineg 301587809
cgetipos 16906391520
cgetr 192134156
cgetr_block 44727
cmpir 1729978
cmpis 6119282
cmpiu 12998688
cmpri 303857
cmprs 40996
cmpsi 6351281
cmpsr 796228
cmpss 1416201
cmpui 12998688
cmpuu 318399704
divii 16303865
divmpr 3759
divrmp 1203052
divsi_rem 0
divss 0
divss_rem 0
dvdii 17072394
dvdiiz 0
dvdis 33765
dvdisz 0
dvdiu 576287
dvdiuz 0
dvdsi 371
dvdui 167545
dvmdis 0
dvmdsBIL 7387209366
dvmdsi 0
dvmdss 0
dvmduBIL 173102388
equalis 1149662
equaliu 3042340
equalsi 1149844
equalui 3042340
evalexpo 13969070756
evallg 100100477870
evalprecp 78703542
evalvalp 81660145
evalvalser 25309350
expi 2476496428
expu 955682735
fixlg 106530359
fractor 7387949
fractor_lg 7389440
gc_NULL 7911299
gc_bool 55260148
gc_const 15929967661
gc_double 198996259
gc_int 2818782
gc_long 243066375
gc_stoi 155900
gc_ulong 52333455
gc_utoi 467826
gc_utoipos 1155334
get_avma 0
hammingu 24078721
icopy 9395707914
icopyspec 120486862
int_bit 21007124
itor 451887700
itor_lg 739850589
itos 477865762
itos_or_0 44914260
itou 180921452
itou_or_0 5015383
leafcopy 5280084343
lg2prec 30271713
maxdd 3218190
maxss 7501291995
maxuu 6603107
mindd 265749
minss 2044958483
minuu 57576702
mod16 308662
mod2 65902663
mod2BIL 113534286
mod32 259
mod4 7594956
mod64 0
mod8 15671980
modis 19638526
modsi 45242137
modss 0
mpabs 2118543865
mpabs_shallow 13428274
mpadd 597690763
mpceil 0
mpcmp 2164494
mpcopy 665
mpdiv 0
mpexpo 37844616
mpfloor 0
mpmul 889215776
mpneg 952054373
mpodd 118265521
mpround 1216173
mpshift 153965593
mpsqr 91840992
mpsub 273950907
mptrunc 49
mulis 470867909
muliu 378831981
mulri 53835790
mulrs 7181596
mulru 2765059
nbits2lg 1675911659
negi 661631181
negr 3961185
new_chunk 98668058663
newblock 857711
rcopy 1101945971
rdivii 5744762
rdivii_lg 13134328
rdiviiz 13173955
rdivis 0
rdivsi 0
rdivss 839647
real2n 1070083
real_0 1160870
real_0_bit 498684995
real_1 133391457
real_1_bit 4699073
real_m1 455
real_m2n 126
remii 3103763370
remis 0
remlll_pre 79167996
remsi 0
remss 0
rtor 308820443
rtor_lg 308824797
sdivsi 102165
sdivsi_rem 51446751
sdivss_rem 0
set_avma 136063105613
setabssign 2187208199
shift_left 7847785075
shift_right 5947865545
shiftl 0
shiftlr 0
shiftr 363954524
shiftr_inplace 472696648
smodis 21176116
smodss 13998082
stack_calloc 110658
stack_calloc_align 3325
stack_malloc 46736379
stack_malloc_align 55668543
stackdummy 3747908029
stoi 776345336
stor 2140785
stor_lg 509051039
subii 8008583063
subir 3030812
subis 171754
subiu 133453477
subri 1538224
subrr 1062943236
subrs 16573100
subsi 6244802
subss 25081
subui 138448808
subuu 25081
thuemorseu 3311
togglesign 1996634600
togglesign_safe 157528370
truedivii 54911863
truedivis 268435
truedivsi 6202318
uabsdiviu_rem 26737503
uabsdivui_rem 128885
udivuu_rem 2418435
ugcdiu 10312791
ugcdui 2737
umodi2n 58326051
umodsu 734430212
umodui 710986
umuluu_le 7618608
umuluu_or_0 6352716
utoi 12433364603
utoineg 300665046
utoipos 14667417091
utor 13344609
utor_lg 13344609
uutoi 9228116099
uutoineg 365874
vali 194753682
varncmp 218513060
varnmax 203
varnmin 26180

Generated by: LCOV version 2.0-1