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-11-16 17:02:43 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 6561746224
Fl_addmul_pre 8206458912
Fl_addmulmul_pre 74220580
Fl_center 4490059
Fl_div 49581753
Fl_double 521706162
Fl_ellj_pre 242740
Fl_halve 20606616
Fl_mul 2549491768
Fl_mul_pre 4450220747
Fl_neg 741557307
Fl_sqr 108122102
Fl_sqr_pre 2568748788
Fl_sub 7689277494
Fl_triple 100188324
Mod16 389809
Mod2 3595514
Mod32 311157
Mod4 50719488
Mod64 0
Mod8 3309346
abscmpiu 32514787
abscmpui 32514787
absequaliu 45906158
absequalui 47655928
absi 2076463132
absi_shallow 60578803
absr 20510
absrnz_equal1 4559176
absrnz_equal2n 1580181
addii 13115866138
addir 490348372
addis 195803074
addiu 101776654
addri 1113221
addrr 3032447967
addrs 12387634
addsi 320991792
addss 25081
addui 105851225
adduu 3540629658
affectsign 0
affectsign_safe 10756842
affii 1002986469
affrr_fixlg 56699204
affsi 6484993
affsr 509051711
affui 47976646
affur 13344807
ceildivuu 3916337
cgetg 28023510559
cgetg_block 430408
cgetg_copy 1490924261
cgeti 28637151114
cgetineg 301594843
cgetipos 16899895712
cgetr 192135221
cgetr_block 44719
cmpir 1730044
cmpis 6119295
cmpiu 13000680
cmpri 303857
cmprs 40996
cmpsi 6351294
cmpsr 796228
cmpss 1416201
cmpui 13000680
cmpuu 318399829
divii 16300112
divmpr 3759
divrmp 1203052
divsi_rem 0
divss 0
divss_rem 0
dvdii 17072429
dvdiiz 0
dvdis 33765
dvdisz 0
dvdiu 576287
dvdiuz 0
dvdsi 371
dvdui 167545
dvmdis 0
dvmdsBIL 7387409119
dvmdsi 0
dvmdss 0
dvmduBIL 172985587
equalis 1149843
equaliu 3042332
equalsi 1150025
equalui 3042332
evalexpo 13971344995
evallg 100071025447
evalprecp 78703528
evalvalp 81660131
evalvalser 25309350
expi 2476478239
expu 955693079
fixlg 106530399
fractor 7387946
fractor_lg 7389437
gc_NULL 7911100
gc_bool 55261624
gc_const 15930947320
gc_double 198966329
gc_int 2818776
gc_long 243067136
gc_stoi 155898
gc_ulong 52334559
gc_utoi 467875
gc_utoipos 1155353
get_avma 0
hammingu 24078751
icopy 9395722384
icopyspec 120487191
int_bit 21032139
itor 451879211
itor_lg 739844094
itos 477865244
itos_or_0 44914159
itou 180922294
itou_or_0 5015376
leafcopy 5280039732
lg2prec 30276954
maxdd 3218607
maxss 7472256567
maxuu 6603112
mindd 265749
minss 2044866008
minuu 57564792
mod16 308662
mod2 65902170
mod2BIL 113536329
mod32 259
mod4 7594956
mod64 0
mod8 15674490
modis 19638526
modsi 45242187
modss 0
mpabs 2118538366
mpabs_shallow 13428274
mpadd 599624491
mpceil 0
mpcmp 2164561
mpcopy 665
mpdiv 0
mpexpo 37843322
mpfloor 0
mpmul 891204450
mpneg 952031123
mpodd 118264994
mpround 1216173
mpshift 153985284
mpsqr 91853504
mpsub 273994514
mptrunc 49
mulis 470860507
muliu 378971464
mulri 53835792
mulrs 7181596
mulru 2765059
nbits2lg 1677556969
negi 661592725
negr 3961171
new_chunk 98649285729
newblock 857703
rcopy 1101943617
rdivii 5744738
rdivii_lg 13134301
rdiviiz 13173928
rdivis 0
rdivsi 0
rdivss 839647
real2n 1070114
real_0 1160883
real_0_bit 500843162
real_1 133394090
real_1_bit 4699422
real_m1 455
real_m2n 126
remii 3104766348
remis 0
remlll_pre 79167995
remsi 0
remss 0
rtor 308828002
rtor_lg 308832356
sdivsi 102165
sdivsi_rem 51446801
sdivss_rem 0
set_avma 136033484803
setabssign 2187202515
shift_left 7847821287
shift_right 5947913230
shiftl 0
shiftlr 0
shiftr 363958921
shiftr_inplace 472701910
smodis 21176116
smodss 13998082
stack_calloc 110672
stack_calloc_align 3325
stack_malloc 46736614
stack_malloc_align 55669549
stackdummy 3738931465
stoi 776324755
stor 2140786
stor_lg 509051711
subii 8009360919
subir 3030785
subis 171754
subiu 133455320
subri 1538270
subrr 1063019159
subrs 16573440
subsi 6244751
subss 25081
subui 138450646
subuu 25081
thuemorseu 3311
togglesign 1996626331
togglesign_safe 157545103
truedivii 54912316
truedivis 268444
truedivsi 6202318
uabsdiviu_rem 26737503
uabsdivui_rem 128885
udivuu_rem 2418435
ugcdiu 10312783
ugcdui 2737
umodi2n 58325412
umodsu 734422298
umodui 710986
umuluu_le 7618608
umuluu_or_0 6363388
utoi 12426998075
utoineg 300672082
utoipos 14661092810
utor 13344667
utor_lg 13344667
uutoi 9224828017
uutoineg 365874
vali 194750990
varncmp 218513442
varnmax 203
varnmin 26180

Generated by: LCOV version 2.0-1