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-10-17 17:03:22 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 6561823821
Fl_addmul_pre 8205524053
Fl_addmulmul_pre 74219374
Fl_center 4490059
Fl_div 49580794
Fl_double 521739793
Fl_ellj_pre 242742
Fl_halve 20609280
Fl_mul 2549515220
Fl_mul_pre 4449089097
Fl_neg 741598840
Fl_sqr 108125559
Fl_sqr_pre 2568564557
Fl_sub 7692108966
Fl_triple 100186699
Mod16 389809
Mod2 3595514
Mod32 311157
Mod4 50719940
Mod64 0
Mod8 3309346
abscmpiu 32504275
abscmpui 32504275
absequaliu 45906187
absequalui 47655957
absi 2076479739
absi_shallow 60568174
absr 20510
absrnz_equal1 4559323
absrnz_equal2n 1580225
addii 13116605789
addir 490354016
addis 195799998
addiu 101748895
addri 1113225
addrr 3033063013
addrs 12387984
addsi 320988716
addss 25081
addui 105823467
adduu 3540680729
affectsign 0
affectsign_safe 10754449
affii 1002898782
affrr_fixlg 56699829
affsi 6484799
affsr 509057500
affui 47976646
affur 13344788
ceildivuu 3918152
cgetg 28024569523
cgetg_block 430408
cgetg_copy 1490941945
cgeti 28641717117
cgetineg 301587113
cgetipos 16900292788
cgetr 192139704
cgetr_block 44726
cmpir 1730088
cmpis 6119312
cmpiu 12999141
cmpri 303857
cmprs 40996
cmpsi 6351311
cmpsr 796228
cmpss 1416201
cmpui 12999141
cmpuu 318395965
divii 16301730
divmpr 3759
divrmp 1203052
divsi_rem 0
divss 0
divss_rem 0
dvdii 17072719
dvdiiz 0
dvdis 33765
dvdisz 0
dvdiu 576287
dvdiuz 0
dvdsi 371
dvdui 167545
dvmdis 0
dvmdsBIL 7387741144
dvmdsi 0
dvmdss 0
dvmduBIL 173076514
equalis 1149947
equaliu 3042348
equalsi 1150129
equalui 3042348
evalexpo 13972106949
evallg 100077606196
evalprecp 78703556
evalvalp 81660159
evalvalser 25309350
expi 2476663752
expu 955697728
fixlg 106531133
fractor 7387946
fractor_lg 7389437
gc_NULL 7911804
gc_bool 55258950
gc_const 15932020451
gc_double 198980087
gc_int 2818788
gc_long 243068644
gc_stoi 155901
gc_ulong 52346366
gc_utoi 467767
gc_utoipos 1155305
get_avma 0
hammingu 24078818
icopy 9396211707
icopyspec 120487099
int_bit 21050233
itor 451923544
itor_lg 739884178
itos 477850231
itos_or_0 44914258
itou 180922479
itou_or_0 5015391
leafcopy 5280164835
lg2prec 30279841
maxdd 3218235
maxss 7474431600
maxuu 6603109
mindd 265753
minss 2045097997
minuu 57514179
mod16 308664
mod2 65903826
mod2BIL 113535973
mod32 259
mod4 7594957
mod64 0
mod8 15672576
modis 19638526
modsi 45242225
modss 0
mpabs 2118551780
mpabs_shallow 13428274
mpadd 600268442
mpceil 0
mpcmp 2164606
mpcopy 665
mpdiv 0
mpexpo 37848965
mpfloor 0
mpmul 891889180
mpneg 952113508
mpodd 118267311
mpround 1216174
mpshift 153966913
mpsqr 91873079
mpsub 274024679
mptrunc 49
mulis 470853390
muliu 379089653
mulri 53835791
mulrs 7181596
mulru 2765059
nbits2lg 1678314245
negi 661687945
negr 3961173
new_chunk 98655870309
newblock 857710
rcopy 1101951862
rdivii 5744759
rdivii_lg 13134322
rdiviiz 13173949
rdivis 0
rdivsi 0
rdivss 839647
real2n 1070099
real_0 1160905
real_0_bit 501530958
real_1 133396240
real_1_bit 4699206
real_m1 455
real_m2n 126
remii 3105998192
remis 0
remlll_pre 79168024
remsi 0
remss 0
rtor 308822738
rtor_lg 308827092
sdivsi 102165
sdivsi_rem 51446839
sdivss_rem 0
set_avma 136042589097
setabssign 2187217133
shift_left 7847849032
shift_right 5947904058
shiftl 0
shiftlr 0
shiftr 363962091
shiftr_inplace 472697836
smodis 21176116
smodss 13998082
stack_calloc 110640
stack_calloc_align 3325
stack_malloc 46736772
stack_malloc_align 55674540
stackdummy 3739008789
stoi 776221993
stor 2140785
stor_lg 509057500
subii 8009994615
subir 3030790
subis 171754
subiu 133456001
subri 1538353
subrr 1063020591
subrs 16573720
subsi 6244663
subss 25081
subui 138451341
subuu 25081
thuemorseu 3311
togglesign 1996706167
togglesign_safe 157533731
truedivii 54898961
truedivis 268455
truedivsi 6202318
uabsdiviu_rem 26737503
uabsdivui_rem 128885
udivuu_rem 2418435
ugcdiu 10312790
ugcdui 2737
umodi2n 58325864
umodsu 734464678
umodui 710986
umuluu_le 7618608
umuluu_or_0 6348301
utoi 12427272810
utoineg 300664352
utoipos 14661317985
utor 13344648
utor_lg 13344648
uutoi 9224940035
uutoineg 365874
vali 194754135
varncmp 218513336
varnmax 203
varnmin 26180

Generated by: LCOV version 2.0-1