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-12-06 17:02:55 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 6561293003
Fl_addmul_pre 8205386722
Fl_addmulmul_pre 74219321
Fl_center 4490059
Fl_div 49579789
Fl_double 521562500
Fl_ellj_pre 242747
Fl_halve 20605025
Fl_mul 2549512376
Fl_mul_pre 4448883797
Fl_neg 741553655
Fl_sqr 108111159
Fl_sqr_pre 2568179995
Fl_sub 7691157056
Fl_triple 100157680
Mod16 389809
Mod2 3595514
Mod32 311157
Mod4 50720199
Mod64 0
Mod8 3309346
abscmpiu 32504278
abscmpui 32504278
absequaliu 45906149
absequalui 47655919
absi 2076474515
absi_shallow 60568120
absr 20510
absrnz_equal1 4559244
absrnz_equal2n 1580211
addii 13116065434
addir 490363490
addis 195801561
addiu 101749093
addri 1113221
addrr 3030819976
addrs 12387761
addsi 320990279
addss 25081
addui 105823664
adduu 3540616253
affectsign 0
affectsign_safe 10755643
affii 1002982907
affrr_fixlg 56699506
affsi 6484752
affsr 509054675
affui 47976646
affur 13344760
ceildivuu 3916198
cgetg 28018701152
cgetg_block 430398
cgetg_copy 1490912603
cgeti 28635160600
cgetineg 301593187
cgetipos 16899967493
cgetr 192136735
cgetr_block 44725
cmpir 1730038
cmpis 6119300
cmpiu 12998989
cmpri 303856
cmprs 40996
cmpsi 6351299
cmpsr 796228
cmpss 1416201
cmpui 12998989
cmpuu 318399125
divii 16305037
divmpr 3759
divrmp 1203052
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 7387199422
dvmdsi 0
dvmdss 0
dvmduBIL 171193900
equalis 1149874
equaliu 3042328
equalsi 1150056
equalui 3042328
evalexpo 13969544518
evallg 100063193787
evalprecp 78703520
evalvalp 81660123
evalvalser 25309350
expi 2476336713
expu 955689280
fixlg 106530695
fractor 7387947
fractor_lg 7389438
gc_NULL 7911796
gc_bool 55261974
gc_const 15930467313
gc_double 198999040
gc_int 2818773
gc_long 243064587
gc_stoi 155902
gc_ulong 52327307
gc_utoi 467853
gc_utoipos 1155323
get_avma 0
hammingu 24078746
icopy 9395721742
icopyspec 120486932
int_bit 21021998
itor 451904273
itor_lg 739868986
itos 477895901
itos_or_0 44914232
itou 180921729
itou_or_0 5015372
leafcopy 5279512594
lg2prec 30274480
maxdd 3218265
maxss 7474442085
maxuu 6603112
mindd 265750
minss 2044761317
minuu 56921399
mod16 308662
mod2 65902056
mod2BIL 113534332
mod32 259
mod4 7594956
mod64 0
mod8 15672592
modis 19638526
modsi 45242160
modss 0
mpabs 2118548213
mpabs_shallow 13428274
mpadd 597968594
mpceil 0
mpcmp 2164554
mpcopy 665
mpdiv 0
mpexpo 37846122
mpfloor 0
mpmul 889517290
mpneg 952019638
mpodd 118264533
mpround 1216173
mpshift 153963752
mpsqr 91848688
mpsub 273969963
mptrunc 49
mulis 470857283
muliu 378911285
mulri 53835788
mulrs 7181596
mulru 2765059
nbits2lg 1676040987
negi 661589342
negr 3961177
new_chunk 98638037453
newblock 857689
rcopy 1101961914
rdivii 5744756
rdivii_lg 13134320
rdiviiz 13173947
rdivis 0
rdivsi 0
rdivss 839647
real2n 1070089
real_0 1160882
real_0_bit 498998087
real_1 133394115
real_1_bit 4699097
real_m1 455
real_m2n 126
remii 3104175386
remis 0
remlll_pre 79168020
remsi 0
remss 0
rtor 308820943
rtor_lg 308825297
sdivsi 102165
sdivsi_rem 51446774
sdivss_rem 0
set_avma 136018296372
setabssign 2187212704
shift_left 7847829240
shift_right 5947917902
shiftl 0
shiftlr 0
shiftr 363958662
shiftr_inplace 472696882
smodis 21176116
smodss 13998082
stack_calloc 110642
stack_calloc_align 3325
stack_malloc 46736568
stack_malloc_align 55671191
stackdummy 3738124757
stoi 775039452
stor 2140784
stor_lg 509054675
subii 8009027994
subir 3030795
subis 171754
subiu 133453839
subri 1538290
subrr 1062969249
subrs 16573435
subsi 6244755
subss 25081
subui 138449160
subuu 25081
thuemorseu 3311
togglesign 1996612008
togglesign_safe 157534959
truedivii 54933480
truedivis 268433
truedivsi 6202318
uabsdiviu_rem 26737503
uabsdivui_rem 128885
udivuu_rem 2418435
ugcdiu 10312786
ugcdui 2737
umodi2n 58326123
umodsu 734429387
umodui 710986
umuluu_le 7618608
umuluu_or_0 6343344
utoi 12427141302
utoineg 300670425
utoipos 14661100313
utor 13344620
utor_lg 13344620
uutoi 9225067324
uutoineg 365874
vali 194755774
varncmp 218513370
varnmax 203
varnmin 26180

Generated by: LCOV version 2.0-1