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-27 17:03:06 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 6562038666
Fl_addmul_pre 8206699718
Fl_addmulmul_pre 74220527
Fl_center 4490059
Fl_div 49580841
Fl_double 521703165
Fl_ellj_pre 242747
Fl_halve 20604708
Fl_mul 2549578842
Fl_mul_pre 4450242207
Fl_neg 741584068
Fl_sqr 108121203
Fl_sqr_pre 2568627610
Fl_sub 7689477384
Fl_triple 100206614
Mod16 389809
Mod2 3595514
Mod32 311157
Mod4 50720945
Mod64 0
Mod8 3309346
abscmpiu 32514825
abscmpui 32514825
absequaliu 45906169
absequalui 47655939
absi 2076482701
absi_shallow 60578831
absr 20510
absrnz_equal1 4559211
absrnz_equal2n 1580143
addii 13116165982
addir 490370733
addis 195808730
addiu 101776727
addri 1113221
addrr 3030940400
addrs 12387732
addsi 320997448
addss 25081
addui 105851298
adduu 3540859090
affectsign 0
affectsign_safe 10755174
affii 1003063065
affrr_fixlg 56699448
affsi 6484838
affsr 509053883
affui 47976646
affur 13344776
ceildivuu 3917315
cgetg 28020233764
cgetg_block 430408
cgetg_copy 1490924011
cgeti 28634911390
cgetineg 301608233
cgetipos 16901111162
cgetr 192136334
cgetr_block 44724
cmpir 1730056
cmpis 6119283
cmpiu 13002599
cmpri 303857
cmprs 40996
cmpsi 6351282
cmpsr 796228
cmpss 1416201
cmpui 13002599
cmpuu 318404105
divii 16307295
divmpr 3759
divrmp 1203037
divsi_rem 0
divss 0
divss_rem 0
dvdii 17072608
dvdiiz 0
dvdis 33765
dvdisz 0
dvdiu 576287
dvdiuz 0
dvdsi 371
dvdui 167545
dvmdis 0
dvmdsBIL 7387415684
dvmdsi 0
dvmdss 0
dvmduBIL 173136833
equalis 1149812
equaliu 3042339
equalsi 1149994
equalui 3042339
evalexpo 13969864749
evallg 100065584007
evalprecp 78703540
evalvalp 81660143
evalvalser 25309350
expi 2476609828
expu 955689459
fixlg 106530750
fractor 7387947
fractor_lg 7389438
gc_NULL 7911070
gc_bool 55266292
gc_const 15930068102
gc_double 199001600
gc_int 2818765
gc_long 243067580
gc_stoi 155901
gc_ulong 52328756
gc_utoi 467893
gc_utoipos 1155325
get_avma 0
hammingu 24078774
icopy 9395883779
icopyspec 120487088
int_bit 21008818
itor 451924959
itor_lg 739892397
itos 477932253
itos_or_0 44914261
itou 180921772
itou_or_0 5015384
leafcopy 5280133934
lg2prec 30274897
maxdd 3218312
maxss 7472154640
maxuu 6603111
mindd 265751
minss 2044947724
minuu 57536260
mod16 308666
mod2 65902622
mod2BIL 113539104
mod32 259
mod4 7594958
mod64 0
mod8 15676749
modis 19638526
modsi 45242148
modss 0
mpabs 2118557683
mpabs_shallow 13428274
mpadd 598058305
mpceil 0
mpcmp 2164578
mpcopy 665
mpdiv 0
mpexpo 37846354
mpfloor 0
mpmul 889650988
mpneg 952022728
mpodd 118265371
mpround 1216174
mpshift 153967837
mpsqr 91852382
mpsub 274011510
mptrunc 49
mulis 470866372
muliu 378840357
mulri 53835789
mulrs 7181596
mulru 2765059
nbits2lg 1676253204
negi 661589318
negr 3961184
new_chunk 98642651126
newblock 857708
rcopy 1101974539
rdivii 5744751
rdivii_lg 13134315
rdiviiz 13173942
rdivis 0
rdivsi 0
rdivss 839647
real2n 1070094
real_0 1160884
real_0_bit 499057450
real_1 133393946
real_1_bit 4699193
real_m1 455
real_m2n 126
remii 3103834564
remis 0
remlll_pre 79168015
remsi 0
remss 0
rtor 308821714
rtor_lg 308826068
sdivsi 102165
sdivsi_rem 51446762
sdivss_rem 0
set_avma 136025223341
setabssign 2187222662
shift_left 7847939275
shift_right 5948029067
shiftl 0
shiftlr 0
shiftr 363958746
shiftr_inplace 472698118
smodis 21176116
smodss 13998082
stack_calloc 110618
stack_calloc_align 3325
stack_malloc 46736717
stack_malloc_align 55671748
stackdummy 3738985881
stoi 776271402
stor 2140785
stor_lg 509053883
subii 8008725273
subir 3030806
subis 171754
subiu 133454054
subri 1538295
subrr 1063014849
subrs 16573452
subsi 6245303
subss 25081
subui 138449385
subuu 25081
thuemorseu 3311
togglesign 1996686451
togglesign_safe 157582038
truedivii 54960309
truedivis 268438
truedivsi 6202318
uabsdiviu_rem 26737503
uabsdivui_rem 128885
udivuu_rem 2418435
ugcdiu 10312781
ugcdui 2737
umodi2n 58326869
umodsu 734415338
umodui 710986
umuluu_le 7618608
umuluu_or_0 6354397
utoi 12427985805
utoineg 300685473
utoipos 14662120552
utor 13344636
utor_lg 13344636
uutoi 9225632458
uutoineg 365874
vali 194758016
varncmp 218513431
varnmax 203
varnmin 26180

Generated by: LCOV version 2.0-1