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-21 17:02: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 6562862025
Fl_addmul_pre 8209152996
Fl_addmulmul_pre 74221455
Fl_center 4490059
Fl_div 49581787
Fl_double 522044190
Fl_ellj_pre 242740
Fl_halve 20610385
Fl_mul 2551290129
Fl_mul_pre 4453783628
Fl_neg 741584691
Fl_sqr 108134221
Fl_sqr_pre 2569933259
Fl_sub 7703744589
Fl_triple 100344413
Mod16 389809
Mod2 3595514
Mod32 311157
Mod4 50720257
Mod64 0
Mod8 3309346
abscmpiu 33384740
abscmpui 33384740
absequaliu 45906155
absequalui 47655925
absi 2076460749
absi_shallow 61448240
absr 20510
absrnz_equal1 4559158
absrnz_equal2n 1580195
addii 13115568739
addir 490350361
addis 195796687
addiu 103516387
addri 1113221
addrr 3032522565
addrs 12387603
addsi 320985405
addss 25081
addui 107590958
adduu 3542313244
affectsign 0
affectsign_safe 10756508
affii 1002906165
affrr_fixlg 56699170
affsi 6484615
affsr 509051733
affui 47976646
affur 13344737
ceildivuu 3919091
cgetg 28034191004
cgetg_block 430408
cgetg_copy 1490915338
cgeti 28637250915
cgetineg 301584175
cgetipos 16903197915
cgetr 192135192
cgetr_block 44707
cmpir 1730031
cmpis 6119290
cmpiu 12998747
cmpri 303857
cmprs 40996
cmpsi 6351289
cmpsr 796228
cmpss 1416201
cmpui 12998747
cmpuu 318396591
divii 16301025
divmpr 3759
divrmp 1203052
divsi_rem 0
divss 0
divss_rem 0
dvdii 17072369
dvdiiz 0
dvdis 33765
dvdisz 0
dvdiu 576287
dvdiuz 0
dvdsi 371
dvdui 167545
dvmdis 0
dvmdsBIL 7387147842
dvmdsi 0
dvmdss 0
dvmduBIL 173050152
equalis 1149746
equaliu 3042327
equalsi 1149928
equalui 3042327
evalexpo 13971392380
evallg 100089097413
evalprecp 78703526
evalvalp 81660129
evalvalser 25309350
expi 2476368322
expu 955681092
fixlg 106530493
fractor 7387946
fractor_lg 7389437
gc_NULL 7912446
gc_bool 55257386
gc_const 15930191465
gc_double 198973040
gc_int 2818760
gc_long 243067990
gc_stoi 155897
gc_ulong 52350227
gc_utoi 467846
gc_utoipos 1155327
get_avma 0
hammingu 24078737
icopy 9395570877
icopyspec 120487017
int_bit 21015213
itor 451901820
itor_lg 739860887
itos 477852025
itos_or_0 44914263
itou 180921582
itou_or_0 5015376
leafcopy 5280091098
lg2prec 30275925
maxdd 3218158
maxss 7485999229
maxuu 6603106
mindd 265748
minss 2044811336
minuu 57544957
mod16 308664
mod2 65902136
mod2BIL 113533863
mod32 259
mod4 7594957
mod64 0
mod8 15672068
modis 19638526
modsi 45242123
modss 0
mpabs 2118533180
mpabs_shallow 13428274
mpadd 599753669
mpceil 0
mpcmp 2164549
mpcopy 665
mpdiv 0
mpexpo 37845719
mpfloor 0
mpmul 891367371
mpneg 952055264
mpodd 118264483
mpround 1216173
mpshift 153962721
mpsqr 91861215
mpsub 274024337
mptrunc 49
mulis 470856652
muliu 378887271
mulri 53835786
mulrs 7181596
mulru 2765059
nbits2lg 1677686984
negi 661633518
negr 3961171
new_chunk 98662563389
newblock 857691
rcopy 1101934495
rdivii 5744702
rdivii_lg 13134265
rdiviiz 13173892
rdivis 0
rdivsi 0
rdivss 839647
real2n 1070080
real_0 1160909
real_0_bit 500945140
real_1 133392576
real_1_bit 4699056
real_m1 455
real_m2n 126
remii 3103971858
remis 0
remlll_pre 79168019
remsi 0
remss 0
rtor 308819008
rtor_lg 308823362
sdivsi 102165
sdivsi_rem 51446737
sdivss_rem 0
set_avma 136054083972
setabssign 2187197578
shift_left 7847821200
shift_right 5947879371
shiftl 0
shiftlr 0
shiftr 363951310
shiftr_inplace 472695457
smodis 21176116
smodss 13998082
stack_calloc 110666
stack_calloc_align 3325
stack_malloc 46736480
stack_malloc_align 55671515
stackdummy 3744165946
stoi 776276868
stor 2140786
stor_lg 509051733
subii 8008739654
subir 3030781
subis 171754
subiu 133453883
subri 1538296
subrr 1063013719
subrs 16573215
subsi 6244985
subss 25081
subui 138449208
subuu 25081
thuemorseu 3311
togglesign 1996599573
togglesign_safe 157507672
truedivii 54902940
truedivis 268443
truedivsi 6202318
uabsdiviu_rem 26737503
uabsdivui_rem 128885
udivuu_rem 2418435
ugcdiu 10312772
ugcdui 2737
umodi2n 58326181
umodsu 734448385
umodui 710986
umuluu_le 7618608
umuluu_or_0 6348116
utoi 12430319327
utoineg 300661415
utoipos 14664358852
utor 13344597
utor_lg 13344597
uutoi 9226440493
uutoineg 365874
vali 194752382
varncmp 218513424
varnmax 203
varnmin 26180

Generated by: LCOV version 2.0-1