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 30835-e55edf4b45) Lines: 605 680 89.0 %
Date: 2026-04-26 09:26:37 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
varnmax 203
mod32 259
dvdsi 371
real_m1 455
mpcopy 665
ugcdui 2737
thuemorseu 3313
stack_calloc_align 3325
varnmin 10374
uabsdivui_rem 16693
absr 20510
addss 25067
subss 25067
subuu 25067
dvdis 33737
cmprs 40996
cgetr_block 44235
sdivsi 102149
stack_calloc 110702
gc_stoi 155903
dvdui 167195
subis 171738
Fl_ellj_pre 238041
mindd 264383
truedivis 268368
cmpri 302870
mod16 307027
Mod32 311108
uutoineg 362789
Mod16 389733
mpdiv 395372
cgetg_block 424568
gc_utoi 468756
dvdiu 576271
umodui 711392
cmpsr 796105
rdivss 839647
real2n 1068652
addri 1106254
equalis 1151271
equalsi 1151453
gc_utoipos 1153566
real_0 1157799
mpround 1216582
absrnz_equal2n 1301131
cmpss 1392943
Mod8 2073877
mpcmp 2156173
Mod2 2370209
udivuu_rem 2418379
gc_int 2739320
mulru 2765892
subir 3000037
equaliu 3021801
equalui 3021802
itou_or_0 3147007
maxdd 3211588
cmpis 3634435
negr 3683163
cmpsi 3866432
ceildivuu 3903699
Fl_center 4486193
absrnz_equal1 4556941
real_1_bit 4714217
mod4 5140554
subri 6083171
subsi 6184656
truedivsi 6202318
umuluu_or_0 6261551
affsi 6446344
maxuu 6611084
mulrs 7181596
fractor 7380427
umuluu_le 7617880
gc_NULL 7962179
cmpir 9441890
ugcdiu 10320783
affectsign_safe 10730049
uabsdiviu_rem 11892741
addrs 12364163
smodss 12522539
cmpiu 12984137
cmpui 12984295
rdivii 13106069
rdiviiz 13151986
mpabs_shallow 13428463
divii 14049986
utor 14266416
affur 14266524
mod8 15588343
subrs 16544459
dvdii 16900794
Fl_halve 18763953
modis 19638526
int_bit 20950426
smodis 21176088
hammingu 24048675
evalvalser 24359582
abscmpui 33011949
abscmpiu 33012062
mulri 38307455
mpexpo 38875578
absequaliu 39546139
absequalui 41296161
Mod4 43848381
itos_or_0 44911682
modsi 45242140
affui 45491533
Fl_div 46748310
stack_malloc 46923641
umodi2n 48991796
sdivsi_rem 51446753
gc_ulong 51691143
truedivii 54749524
stack_malloc_align 55532851
affrr_fixlg 56115740
gc_bool 56794591
absi_shallow 57053570
mod2 62589349
Fl_addmulmul_pre 64591313
minuu 69649259
remlll_pre 75636548
evalprecp 78672975
evalvalp 81629386
Fl_triple 87131693
mpsqr 90767904
addiu 98090413
Fl_sqr 99525949
addui 102165432
fixlg 105855336
mod2BIL 107449424
mpodd 116092660
icopyspec 118026802
subiu 133460486
real_1 133703813
subui 138437686
mpshift 153474992
togglesign_safe 157297268
dvmduBIL 165596851
itou 179081383
gc_double 184159212
shiftr 188190577
vali 191177192
addis 194789020
varncmp 199456755
gc_long 242675236
mpsub 249686155
utoineg 298146700
cgetineg 299007311
rtor 303782357
addsi 319974501
muliu 373220835
Fl_double 441905207
shiftr_inplace 466909704
mulis 467123782
itos 476341587
real_0_bit 481822843
addir 482813727
affsr 501381372
stor 501709701
mpadd 572265953
negi 641044642
itor 716828255
Fl_neg 728924716
umodsu 734177449
expu 797084911
stoi 799087622
lg2prec 815901356
mpmul 834981127
rcopy 916881296
mpneg 926922352
affii 965013168
subrr 1006483866
cmpuu 1490531367
cgetg_copy 1492174790
cgetr 1875941055
togglesign 1953845930
minss 2027714384
absi 2069080934
mpabs 2140012944
setabssign 2207329748
Fl_sqr_pre 2334946142
nbits2lg 2402975466
expi 2425300647
Fl_mul 2437120997
addrr 2931012144
remii 3061838685
adduu 3449494221
stackdummy 3687168420
Fl_mul_pre 4212629529
leafcopy 5064450762
shift_right 5732745311
Fl_add 6139229395
dvmdsBIL 7150093095
Fl_sub 7397126264
Fl_addmul_pre 7648281642
subii 7718360152
shift_left 7798202881
uutoi 8937790000
icopy 9154312543
maxss 9706555281
utoi 12054508474
addii 12532643310
evalexpo 13394544039
utoipos 14270179122
gc_const 15654078546
cgetipos 16452029356
cgetg 25522282729
cgeti 27480636789
new_chunk 95134794174
evallg 96866046661
set_avma 131356822781

Generated by: LCOV version 1.16