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-08 17:03:11 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 6561764682
Fl_addmul_pre 8206361067
Fl_addmulmul_pre 74219983
Fl_center 4490059
Fl_div 49581155
Fl_double 521303963
Fl_ellj_pre 242718
Fl_halve 20601783
Fl_mul 2551021083
Fl_mul_pre 4448717118
Fl_neg 741556143
Fl_sqr 108108072
Fl_sqr_pre 2567783720
Fl_sub 7703067115
Fl_triple 100025666
Mod16 389809
Mod2 3595514
Mod32 311157
Mod4 50722482
Mod64 0
Mod8 3309346
abscmpiu 33250179
abscmpui 33250179
absequaliu 45906177
absequalui 47655947
absi 2076504761
absi_shallow 61314098
absr 20510
absrnz_equal1 4559262
absrnz_equal2n 1580190
addii 13117568059
addir 490378753
addis 195808233
addiu 103240261
addri 1113223
addrr 3031157146
addrs 12387877
addsi 320996951
addss 25081
addui 107314831
adduu 3542462706
affectsign 0
affectsign_safe 10754910
affii 1003047144
affrr_fixlg 56699801
affsi 6484814
affsr 509057205
affui 47976646
affur 13344777
ceildivuu 3915054
cgetg 28029147030
cgetg_block 430408
cgetg_copy 1490941382
cgeti 28645793759
cgetineg 301603299
cgetipos 16904681494
cgetr 192141022
cgetr_block 44734
cmpir 1730073
cmpis 6119307
cmpiu 13001789
cmpri 303856
cmprs 40996
cmpsi 6351306
cmpsr 796228
cmpss 1416201
cmpui 13001789
cmpuu 318396108
divii 16308694
divmpr 3759
divrmp 1203034
divsi_rem 0
divss 0
divss_rem 0
dvdii 17072484
dvdiiz 0
dvdis 33765
dvdisz 0
dvdiu 576287
dvdiuz 0
dvdsi 371
dvdui 167545
dvmdis 0
dvmdsBIL 7387968882
dvmdsi 0
dvmdss 0
dvmduBIL 173177038
equalis 1149887
equaliu 3042341
equalsi 1150069
equalui 3042341
evalexpo 13970428363
evallg 100093119154
evalprecp 78703548
evalvalp 81660151
evalvalser 25309350
expi 2476680813
expu 955696991
fixlg 106531099
fractor 7387947
fractor_lg 7389438
gc_NULL 7912156
gc_bool 55265123
gc_const 15931809145
gc_double 199019225
gc_int 2818778
gc_long 243068487
gc_stoi 155903
gc_ulong 52315750
gc_utoi 467867
gc_utoipos 1155340
get_avma 0
hammingu 24078779
icopy 9396411084
icopyspec 120487665
int_bit 21045078
itor 451983551
itor_lg 739953325
itos 477931551
itos_or_0 44914238
itou 180921916
itou_or_0 5015387
leafcopy 5280278211
lg2prec 30276413
maxdd 3218023
maxss 7486532059
maxuu 6603110
mindd 265750
minss 2045032455
minuu 57503377
mod16 308664
mod2 65903081
mod2BIL 113538605
mod32 259
mod4 7594957
mod64 0
mod8 15675820
modis 19638526
modsi 45242187
modss 0
mpabs 2118579233
mpabs_shallow 13428274
mpadd 598233289
mpceil 0
mpcmp 2164595
mpcopy 665
mpdiv 0
mpexpo 37852532
mpfloor 0
mpmul 889890348
mpneg 952138380
mpodd 118266221
mpround 1216174
mpshift 153964303
mpsqr 91869894
mpsub 274068865
mptrunc 49
mulis 470882391
muliu 379062275
mulri 53835788
mulrs 7181596
mulru 2765059
nbits2lg 1676433619
negi 661703388
negr 3961178
new_chunk 98662947843
newblock 857718
rcopy 1101990869
rdivii 5744781
rdivii_lg 13134345
rdiviiz 13173972
rdivis 0
rdivsi 0
rdivss 839647
real2n 1070093
real_0 1160896
real_0_bit 499170674
real_1 133398205
real_1_bit 4699138
real_m1 455
real_m2n 126
remii 3105738203
remis 0
remlll_pre 79168015
remsi 0
remss 0
rtor 308821946
rtor_lg 308826300
sdivsi 102165
sdivsi_rem 51446801
sdivss_rem 0
set_avma 136053717443
setabssign 2187245759
shift_left 7848094592
shift_right 5948193537
shiftl 0
shiftlr 0
shiftr 363967239
shiftr_inplace 472697973
smodis 21176116
smodss 13998082
stack_calloc 110628
stack_calloc_align 3325
stack_malloc 46737064
stack_malloc_align 55677476
stackdummy 3743223474
stoi 776206439
stor 2140786
stor_lg 509057205
subii 8009978580
subir 3030764
subis 171754
subiu 133457118
subri 1538374
subrr 1063070296
subrs 16573551
subsi 6244709
subss 25081
subui 138452451
subuu 25081
thuemorseu 3311
togglesign 1996823789
togglesign_safe 157574309
truedivii 54957261
truedivis 268463
truedivsi 6202318
uabsdiviu_rem 26737503
uabsdivui_rem 128885
udivuu_rem 2418435
ugcdiu 10312784
ugcdui 2737
umodi2n 58328406
umodsu 734387787
umodui 710986
umuluu_le 7618608
umuluu_or_0 6347270
utoi 12431557250
utoineg 300680537
utoipos 14665675045
utor 13344637
utor_lg 13344637
uutoi 9227532662
uutoineg 365874
vali 194761093
varncmp 218513256
varnmax 203
varnmin 26180

Generated by: LCOV version 2.0-1