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-10-07 17:02:40 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 6561282631
Fl_addmul_pre 8204688796
Fl_addmulmul_pre 74216375
Fl_center 4490059
Fl_div 49581044
Fl_double 521530006
Fl_ellj_pre 242739
Fl_halve 20603459
Fl_mul 2550078355
Fl_mul_pre 4448052214
Fl_neg 741570340
Fl_sqr 108114492
Fl_sqr_pre 2567944504
Fl_sub 7696903329
Fl_triple 100162089
Mod16 389809
Mod2 3595514
Mod32 311157
Mod4 50721474
Mod64 0
Mod8 3309346
abscmpiu 32807589
abscmpui 32807589
absequaliu 45906172
absequalui 47655942
absi 2076488154
absi_shallow 60871456
absr 20510
absrnz_equal1 4559229
absrnz_equal2n 1580213
addii 13116656938
addir 490371138
addis 195803226
addiu 102352945
addri 1113221
addrr 3030805411
addrs 12387676
addsi 320991944
addss 25081
addui 106427516
adduu 3541425485
affectsign 0
affectsign_safe 10755764
affii 1002986190
affrr_fixlg 56699492
affsi 6484822
affsr 509054720
affui 47976646
affur 13344761
ceildivuu 3916623
cgetg 28024076222
cgetg_block 430408
cgetg_copy 1490920804
cgeti 28638958196
cgetineg 301595052
cgetipos 16902256576
cgetr 192138134
cgetr_block 44723
cmpir 1730025
cmpis 6119290
cmpiu 13001943
cmpri 303857
cmprs 40996
cmpsi 6351289
cmpsr 796228
cmpss 1416201
cmpui 13001943
cmpuu 318394637
divii 16306579
divmpr 3759
divrmp 1203052
divsi_rem 0
divss 0
divss_rem 0
dvdii 17072433
dvdiiz 0
dvdis 33765
dvdisz 0
dvdiu 576287
dvdiuz 0
dvdsi 371
dvdui 167545
dvmdis 0
dvmdsBIL 7387591401
dvmdsi 0
dvmdss 0
dvmduBIL 171051321
equalis 1149725
equaliu 3042338
equalsi 1149907
equalui 3042338
evalexpo 13969827573
evallg 100075443432
evalprecp 78703544
evalvalp 81660147
evalvalser 25309350
expi 2476586675
expu 955690646
fixlg 106530793
fractor 7387947
fractor_lg 7389438
gc_NULL 7910860
gc_bool 55261579
gc_const 15930753481
gc_double 199008436
gc_int 2818771
gc_long 243062806
gc_stoi 155901
gc_ulong 52322353
gc_utoi 467879
gc_utoipos 1155324
get_avma 0
hammingu 24078781
icopy 9396032383
icopyspec 120487036
int_bit 21022905
itor 451945338
itor_lg 739913663
itos 477892896
itos_or_0 44914250
itou 180921197
itou_or_0 5015385
leafcopy 5279511705
lg2prec 30274151
maxdd 3218252
maxss 7479659949
maxuu 6603115
mindd 265749
minss 2044986487
minuu 57506742
mod16 308664
mod2 65902868
mod2BIL 113537930
mod32 259
mod4 7594957
mod64 0
mod8 15675333
modis 19638526
modsi 45242189
modss 0
mpabs 2118562739
mpabs_shallow 13428274
mpadd 597914140
mpceil 0
mpcmp 2164543
mpcopy 665
mpdiv 0
mpexpo 37849285
mpfloor 0
mpmul 889536043
mpneg 952073957
mpodd 118265592
mpround 1216170
mpshift 153966598
mpsqr 91858825
mpsub 274038599
mptrunc 49
mulis 470851909
muliu 378925901
mulri 53835783
mulrs 7181596
mulru 2765059
nbits2lg 1676099711
negi 661643179
negr 3961188
new_chunk 98652530200
newblock 857707
rcopy 1101974904
rdivii 5744750
rdivii_lg 13134314
rdiviiz 13173941
rdivis 0
rdivsi 0
rdivss 839647
real2n 1070088
real_0 1160881
real_0_bit 498851865
real_1 133395503
real_1_bit 4699124
real_m1 455
real_m2n 126
remii 3104607133
remis 0
remlll_pre 79167991
remsi 0
remss 0
rtor 308820447
rtor_lg 308824801
sdivsi 102165
sdivsi_rem 51446803
sdivss_rem 0
set_avma 136038465582
setabssign 2187227592
shift_left 7847986547
shift_right 5948095789
shiftl 0
shiftlr 0
shiftr 363962376
shiftr_inplace 472698082
smodis 21176116
smodss 13998082
stack_calloc 110632
stack_calloc_align 3325
stack_malloc 46736609
stack_malloc_align 55673823
stackdummy 3739808127
stoi 776208290
stor 2140782
stor_lg 509054720
subii 8009165792
subir 3030783
subis 171754
subiu 133452852
subri 1538306
subrr 1063033845
subrs 16573350
subsi 6244698
subss 25081
subui 138448185
subuu 25081
thuemorseu 3311
togglesign 1996702807
togglesign_safe 157548215
truedivii 54931376
truedivis 268433
truedivsi 6202318
uabsdiviu_rem 26737503
uabsdivui_rem 128885
udivuu_rem 2418435
ugcdiu 10312793
ugcdui 2737
umodi2n 58327398
umodsu 734407286
umodui 710986
umuluu_le 7618608
umuluu_or_0 6377695
utoi 12429175647
utoineg 300672290
utoipos 14663269837
utor 13344621
utor_lg 13344621
uutoi 9226191445
uutoineg 365874
vali 194757871
varncmp 218513327
varnmax 203
varnmin 26180

Generated by: LCOV version 2.0-1