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-16 17:03:01 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 6561727040
Fl_addmul_pre 8205628299
Fl_addmulmul_pre 74215610
Fl_center 4490059
Fl_div 49582124
Fl_double 521402444
Fl_ellj_pre 242719
Fl_halve 20599840
Fl_mul 2552524855
Fl_mul_pre 4448457818
Fl_neg 741571318
Fl_sqr 108103692
Fl_sqr_pre 2567768632
Fl_sub 7718316593
Fl_triple 100087689
Mod16 389809
Mod2 3595514
Mod32 311157
Mod4 50719416
Mod64 0
Mod8 3309346
abscmpiu 34003361
abscmpui 34003361
absequaliu 45906185
absequalui 47655955
absi 2076466869
absi_shallow 62067270
absr 20510
absrnz_equal1 4559222
absrnz_equal2n 1580179
addii 13116228546
addir 490346993
addis 195796637
addiu 104758947
addri 1113221
addrr 3032637692
addrs 12387864
addsi 320985355
addss 25081
addui 108833518
adduu 3543660775
affectsign 0
affectsign_safe 10756558
affii 1002917597
affrr_fixlg 56699573
affsi 6484830
affsr 509054568
affui 47976646
affur 13344752
ceildivuu 3914984
cgetg 28040380364
cgetg_block 430408
cgetg_copy 1490919477
cgeti 28645075553
cgetineg 301585422
cgetipos 16906276112
cgetr 192138271
cgetr_block 44725
cmpir 1730069
cmpis 6119306
cmpiu 12998873
cmpri 303857
cmprs 40996
cmpsi 6351305
cmpsr 796228
cmpss 1416201
cmpui 12998873
cmpuu 318396491
divii 16300584
divmpr 3759
divrmp 1203037
divsi_rem 0
divss 0
divss_rem 0
dvdii 17072590
dvdiiz 0
dvdis 33765
dvdisz 0
dvdiu 576287
dvdiuz 0
dvdsi 371
dvdui 167545
dvmdis 0
dvmdsBIL 7387536053
dvmdsi 0
dvmdss 0
dvmduBIL 173033419
equalis 1149930
equaliu 3042347
equalsi 1150112
equalui 3042347
evalexpo 13971537225
evallg 100109431296
evalprecp 78703556
evalvalp 81660159
evalvalser 25309350
expi 2476637958
expu 955686771
fixlg 106530880
fractor 7387947
fractor_lg 7389438
gc_NULL 7911382
gc_bool 55259228
gc_const 15931309676
gc_double 198976036
gc_int 2818778
gc_long 243067383
gc_stoi 155897
gc_ulong 52306017
gc_utoi 467773
gc_utoipos 1155309
get_avma 0
hammingu 24078793
icopy 9396008679
icopyspec 120486817
int_bit 21035661
itor 451904940
itor_lg 739865142
itos 477845225
itos_or_0 44914238
itou 180921600
itou_or_0 5015390
leafcopy 5280054274
lg2prec 30278052
maxdd 3218224
maxss 7501089961
maxuu 6603112
mindd 265751
minss 2045094843
minuu 57573983
mod16 308662
mod2 65903269
mod2BIL 113535042
mod32 259
mod4 7594956
mod64 0
mod8 15672183
modis 19638526
modsi 45242207
modss 0
mpabs 2118540715
mpabs_shallow 13428274
mpadd 599864334
mpceil 0
mpcmp 2164583
mpcopy 665
mpdiv 0
mpexpo 37848352
mpfloor 0
mpmul 891462581
mpneg 952071240
mpodd 118266852
mpround 1216174
mpshift 153965695
mpsqr 91867020
mpsub 274006673
mptrunc 49
mulis 470845751
muliu 379001728
mulri 53835786
mulrs 7181596
mulru 2765059
nbits2lg 1677925810
negi 661643613
negr 3961180
new_chunk 98670126210
newblock 857709
rcopy 1101935152
rdivii 5744754
rdivii_lg 13134318
rdiviiz 13173945
rdivis 0
rdivsi 0
rdivss 839647
real2n 1070087
real_0 1160897
real_0_bit 501098325
real_1 133395841
real_1_bit 4699101
real_m1 455
real_m2n 126
remii 3105291644
remis 0
remlll_pre 79168019
remsi 0
remss 0
rtor 308821416
rtor_lg 308825770
sdivsi 102165
sdivsi_rem 51446821
sdivss_rem 0
set_avma 136063022289
setabssign 2187205097
shift_left 7847784065
shift_right 5947855939
shiftl 0
shiftlr 0
shiftr 363954683
shiftr_inplace 472697411
smodis 21176116
smodss 13998082
stack_calloc 110648
stack_calloc_align 3325
stack_malloc 46736607
stack_malloc_align 55673228
stackdummy 3747771659
stoi 776338499
stor 2140785
stor_lg 509054568
subii 8009496182
subir 3030811
subis 171754
subiu 133454046
subri 1538345
subrr 1063002688
subrs 16573528
subsi 6244737
subss 25081
subui 138449385
subuu 25081
thuemorseu 3311
togglesign 1996625428
togglesign_safe 157513703
truedivii 54895258
truedivis 268451
truedivsi 6202318
uabsdiviu_rem 26737503
uabsdivui_rem 128885
udivuu_rem 2418435
ugcdiu 10312790
ugcdui 2737
umodi2n 58325340
umodsu 734376154
umodui 710986
umuluu_le 7618608
umuluu_or_0 6345195
utoi 12433209668
utoineg 300662661
utoipos 14667244288
utor 13344612
utor_lg 13344612
uutoi 9227966079
uutoineg 365874
vali 194751426
varncmp 218513388
varnmax 203
varnmin 26180

Generated by: LCOV version 2.0-1