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) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30608-ad1edb9ceb) Lines: 605 680 89.0 %
Date: 2026-01-13 09:22:00 Functions: 214 238 89.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Mod64 0
affectsign 0
divsi_rem 0
divss 0
divss_rem 0
dvdiiz 0
dvdisz 0
dvdiuz 0
dvmdis 0
dvmdsi 0
dvmdss 0
get_avma 0
mod64 0
modss 0
mpceil 0
mpfloor 0
rdivis 0
rdivsi 0
remis 0
remsi 0
remss 0
sdivss_rem 0
shiftl 0
shiftlr 0
mptrunc 49
real_m2n 126
absr 140
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 2851
stack_calloc_align 3307
varnmin 15547
uabsdivui_rem 16693
addss 25067
subss 25067
subuu 25067
dvdis 33709
cmprs 40996
cgetr_block 43782
sdivsi 102151
stack_calloc 110359
gc_stoi 155881
dvdui 167195
subis 170920
Fl_ellj_pre 238062
mod16 241108
mindd 264338
truedivis 266961
cmpri 282310
Mod32 311108
uutoineg 362238
Mod16 389733
cgetg_block 407176
gc_utoi 468663
dvdiu 576269
mpdiv 665625
cmpsr 796096
rdivss 839647
real2n 1067015
addri 1105789
gc_utoipos 1153469
real_0 1156431
equalis 1185547
equalsi 1185729
mpround 1216575
absrnz_equal2n 1292656
umodui 1296275
cmpss 1379853
Mod8 2073782
mpcmp 2225856
Mod2 2370061
udivuu_rem 2416412
gc_int 2631162
mulru 2765892
subir 3005082
equaliu 3018185
equalui 3018187
itou_or_0 3041714
maxdd 3178297
cmpis 3634855
negr 3671257
cmpsi 3866857
ceildivuu 3901410
Fl_center 4486191
absrnz_equal1 4519933
real_1_bit 4704812
maxuu 4814866
mod4 5083651
umuluu_or_0 5511060
umuluu_le 5803291
subsi 6093562
subri 6130949
truedivsi 6202031
affsi 6373097
mulrs 7181596
fractor 7376773
gc_NULL 7961540
cmpir 9435212
ugcdiu 10114389
cmpiu 10132396
cmpui 10132424
affectsign_safe 10727055
uabsdiviu_rem 11892741
addrs 12305005
smodss 12517430
rdivii 13102560
rdiviiz 13145783
mod8 13162757
mpabs_shallow 13428463
utor 13461749
affur 13461857
divii 14047742
subrs 16475625
dvdii 16562027
Fl_halve 18788529
modis 19638526
int_bit 20943208
smodis 21176060
evalvalser 21527935
hammingu 24048398
abscmpiu 32736618
abscmpui 32736838
mulri 38033770
mpexpo 38876528
absequaliu 39660548
absequalui 41409401
itos_or_0 43599221
Mod4 43773619
modsi 45225544
affui 45473825
Fl_div 46552847
stack_malloc 46627122
truedivii 47031649
umodi2n 48916773
sdivsi_rem 51429872
gc_bool 51985498
gc_ulong 52070089
affrr_fixlg 54653158
stack_malloc_align 55499669
absi_shallow 57786309
mod2 61112732
Fl_addmulmul_pre 64588973
minuu 69197308
remlll_pre 75799155
evalprecp 78662760
evalvalp 81620089
mpsqr 91029189
Fl_triple 94357231
Fl_sqr 95845628
addiu 96152615
addui 99796605
mod2BIL 103305244
fixlg 104196703
mpodd 115075997
icopyspec 117424610
togglesign_safe 125524071
real_1 129810719
subiu 131842505
subui 136815480
mpshift 153186275
dvmduBIL 165754636
shiftr 177967541
itou 178233608
addis 181563664
gc_double 184165668
vali 190377882
varncmp 217202890
gc_long 242314756
mpsub 251569455
utoineg 293939179
cgetineg 294800707
rtor 295236057
addsi 306747679
muliu 374349062
itos 462149962
shiftr_inplace 464252160
mulis 466280424
Fl_double 468665847
real_0_bit 479275452
addir 481418639
affsr 486068487
stor 486442210
mpadd 574477655
negi 636912830
itor 714878782
Fl_neg 719304080
umodsu 723928161
stoi 772571556
expu 775358419
lg2prec 799882118
mpmul 837665331
rcopy 903193037
affii 910203051
mpneg 916826682
subrr 1000152930
cgetg_copy 1480068535
cmpuu 1492610609
cgetr 1840153981
togglesign 1912188665
minss 2009568301
absi 2068343313
mpabs 2139129860
Fl_sqr_pre 2173521296
setabssign 2205864257
nbits2lg 2366147144
Fl_mul 2418859976
expi 2448412749
addrr 2877187755
remii 3004250143
adduu 3409341062
stackdummy 3640548070
Fl_mul_pre 4084915942
Fl_add 4398218626
leafcopy 4973773933
shift_right 5631783267
dvmdsBIL 7009827225
Fl_sub 7266131759
subii 7654118370
Fl_addmul_pre 7660686065
shift_left 7675574406
uutoi 8808123985
icopy 9052169748
maxss 9700816955
utoi 11898275348
addii 12404012246
evalexpo 13133501746
utoipos 14145763575
gc_const 15508837702
cgetipos 16310676854
cgetg 24546839127
cgeti 27092169714
new_chunk 93215676827
evallg 95196202501
set_avma 128975213646

Generated by: LCOV version 1.16