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-26 17:04:41 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 6561341701
Fl_addmul_pre 8204863770
Fl_addmulmul_pre 74213750
Fl_center 4490059
Fl_div 49581578
Fl_double 521430599
Fl_ellj_pre 242728
Fl_halve 20604363
Fl_mul 2550261021
Fl_mul_pre 4447892918
Fl_neg 741559605
Fl_sqr 108112003
Fl_sqr_pre 2567860387
Fl_sub 7697154528
Fl_triple 100085682
Mod16 389809
Mod2 3595514
Mod32 311157
Mod4 50720788
Mod64 0
Mod8 3309346
abscmpiu 32865306
abscmpui 32865306
absequaliu 45906175
absequalui 47655945
absi 2076481056
absi_shallow 60929036
absr 20510
absrnz_equal1 4559279
absrnz_equal2n 1580238
addii 13116537214
addir 490368642
addis 195803653
addiu 102475065
addri 1113223
addrr 3030708238
addrs 12387734
addsi 320992371
addss 25081
addui 106549636
adduu 3541465850
affectsign 0
affectsign_safe 10755792
affii 1002987364
affrr_fixlg 56699587
affsi 6484999
affsr 509056021
affui 47976646
affur 13344789
ceildivuu 3914776
cgetg 28023953776
cgetg_block 430408
cgetg_copy 1490927061
cgeti 28640351284
cgetineg 301591999
cgetipos 16902044019
cgetr 192138258
cgetr_block 44717
cmpir 1730033
cmpis 6119306
cmpiu 12999830
cmpri 303857
cmprs 40996
cmpsi 6351305
cmpsr 796228
cmpss 1416201
cmpui 12999830
cmpuu 318397197
divii 16305684
divmpr 3759
divrmp 1203037
divsi_rem 0
divss 0
divss_rem 0
dvdii 17072567
dvdiiz 0
dvdis 33765
dvdisz 0
dvdiu 576287
dvdiuz 0
dvdsi 371
dvdui 167545
dvmdis 0
dvmdsBIL 7387702776
dvmdsi 0
dvmdss 0
dvmduBIL 173205743
equalis 1149798
equaliu 3042342
equalsi 1149980
equalui 3042342
evalexpo 13969726256
evallg 100078506286
evalprecp 78703546
evalvalp 81660149
evalvalser 25309350
expi 2476600144
expu 955699914
fixlg 106530809
fractor 7387946
fractor_lg 7389437
gc_NULL 7912007
gc_bool 55263477
gc_const 15931184392
gc_double 198999011
gc_int 2818770
gc_long 243067624
gc_stoi 155898
gc_ulong 52329608
gc_utoi 467794
gc_utoipos 1155343
get_avma 0
hammingu 24078796
icopy 9396058059
icopyspec 120487011
int_bit 21032724
itor 451920909
itor_lg 739891041
itos 477897044
itos_or_0 44914285
itou 180921370
itou_or_0 5015387
leafcopy 5280168704
lg2prec 30274420
maxdd 3218318
maxss 7480176477
maxuu 6603108
mindd 265751
minss 2045031386
minuu 57597009
mod16 308666
mod2 65902793
mod2BIL 113535581
mod32 259
mod4 7594958
mod64 0
mod8 15673192
modis 19638526
modsi 45242183
modss 0
mpabs 2118556071
mpabs_shallow 13428274
mpadd 597785701
mpceil 0
mpcmp 2164551
mpcopy 665
mpdiv 0
mpexpo 37847526
mpfloor 0
mpmul 889368392
mpneg 952035947
mpodd 118265959
mpround 1216186
mpshift 153979329
mpsqr 91851734
mpsub 274004571
mptrunc 49
mulis 470864816
muliu 378985560
mulri 53835787
mulrs 7181596
mulru 2765059
nbits2lg 1675999991
negi 661591842
negr 3961189
new_chunk 98654492179
newblock 857701
rcopy 1101982977
rdivii 5744730
rdivii_lg 13134293
rdiviiz 13173920
rdivis 0
rdivsi 0
rdivss 839647
real2n 1070106
real_0 1160837
real_0_bit 498744233
real_1 133396853
real_1_bit 4699326
real_m1 455
real_m2n 126
remii 3105033848
remis 0
remlll_pre 79168015
remsi 0
remss 0
rtor 308827918
rtor_lg 308832272
sdivsi 102165
sdivsi_rem 51446797
sdivss_rem 0
set_avma 136043429196
setabssign 2187220968
shift_left 7847958019
shift_right 5948106855
shiftl 0
shiftlr 0
shiftr 363966879
shiftr_inplace 472701659
smodis 21176116
smodss 13998082
stack_calloc 110638
stack_calloc_align 3325
stack_malloc 46736435
stack_malloc_align 55671429
stackdummy 3741100983
stoi 776390202
stor 2140788
stor_lg 509056021
subii 8009501669
subir 3030813
subis 171754
subiu 133454862
subri 1538264
subrr 1063037301
subrs 16573516
subsi 6244828
subss 25081
subui 138450197
subuu 25081
thuemorseu 3311
togglesign 1996652601
togglesign_safe 157553426
truedivii 54934746
truedivis 268430
truedivsi 6202318
uabsdiviu_rem 26737503
uabsdivui_rem 128885
udivuu_rem 2418435
ugcdiu 10312781
ugcdui 2737
umodi2n 58326712
umodsu 734409424
umodui 710986
umuluu_le 7618608
umuluu_or_0 6343345
utoi 12428990325
utoineg 300669241
utoipos 14663063754
utor 13344649
utor_lg 13344649
uutoi 9225979578
uutoineg 365874
vali 194756165
varncmp 218513460
varnmax 203
varnmin 26180

Generated by: LCOV version 2.0-1