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 30759-17b423fb9b) Lines: 605 680 89.0 %
Date: 2026-03-21 09:26:11 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 19040
addss 25067
subss 25067
subuu 25067
dvdis 33730
cmprs 40996
cgetr_block 44260
sdivsi 102150
stack_calloc 110699
gc_stoi 155898
dvdui 167195
subis 171739
Fl_ellj_pre 238057
mindd 264381
truedivis 268365
cmpri 284263
mod16 307021
Mod32 311108
uutoineg 363103
Mod16 389733
cgetg_block 426322
gc_utoi 468753
dvdiu 576280
mpdiv 665508
cmpsr 796102
rdivss 839647
real2n 1068609
addri 1106275
equalis 1151350
equalsi 1151532
gc_utoipos 1153598
real_0 1157730
mpround 1216595
umodui 1290953
absrnz_equal2n 1300310
cmpss 1392943
Mod8 2074296
mpcmp 2226380
Mod2 2370291
udivuu_rem 2418379
gc_int 2742556
mulru 2765892
subir 3004971
equaliu 3021735
equalui 3021736
itou_or_0 3147016
maxdd 3211489
cmpis 3634464
negr 3682873
cmpsi 3866465
ceildivuu 3904421
Fl_center 4486194
absrnz_equal1 4553150
real_1_bit 4713924
mod4 5141108
subri 6093535
subsi 6184610
truedivsi 6202031
umuluu_or_0 6254092
affsi 6446065
maxuu 6610786
mulrs 7181596
fractor 7379034
umuluu_le 7617880
gc_NULL 7962678
cmpir 9445953
ugcdiu 10320691
affectsign_safe 10730913
uabsdiviu_rem 11892741
addrs 12360801
smodss 12604791
cmpui 12982761
cmpiu 12982940
rdivii 13105129
rdiviiz 13146650
mpabs_shallow 13428463
divii 14066822
utor 14335031
affur 14335144
mod8 15584028
subrs 16536633
dvdii 16898594
Fl_halve 18827203
modis 19638526
int_bit 20957962
smodis 21176081
hammingu 24048779
evalvalser 24359582
abscmpiu 33747158
abscmpui 33747208
mulri 38284778
mpexpo 38875270
absequaliu 39540648
absequalui 41290633
Mod4 43858593
itos_or_0 44910888
modsi 45242108
affui 45491533
Fl_div 46842374
stack_malloc 46929629
umodi2n 49003365
sdivsi_rem 51446436
gc_ulong 52087089
truedivii 54752831
stack_malloc_align 55535192
affrr_fixlg 56108861
gc_bool 56172055
absi_shallow 57797352
mod2 61683063
Fl_addmulmul_pre 64694407
minuu 69675006
remlll_pre 76398373
evalprecp 78675939
evalvalp 81632388
mpsqr 91033061
Fl_triple 91177309
Fl_sqr 99536672
addiu 99557106
addui 103632206
fixlg 105719216
mod2BIL 106542951
mpodd 115186926
icopyspec 117798105
subiu 133398829
real_1 133636829
subui 138374973
mpshift 153567549
togglesign_safe 157335665
dvmduBIL 159257882
itou 179067203
gc_double 184197243
shiftr 187862690
vali 190836701
addis 194663266
varncmp 198759226
gc_long 242624221
mpsub 251566445
utoineg 297820209
cgetineg 298681789
rtor 303761334
addsi 319849048
muliu 376504156
Fl_double 453100219
mulis 467129600
shiftr_inplace 467421179
itos 476339080
real_0_bit 482566959
addir 483072747
affsr 501344441
stor 501722540
mpadd 573112207
negi 640894358
itor 717237611
Fl_neg 723522046
umodsu 734183943
expu 796746179
stoi 797262338
lg2prec 816390563
mpmul 837377179
rcopy 916775094
mpneg 926510104
affii 965457009
subrr 1006362150
cgetg_copy 1482371994
cmpuu 1490482232
cgetr 1876358689
togglesign 1953660143
minss 2025910189
absi 2067022126
mpabs 2137971811
setabssign 2205015916
Fl_sqr_pre 2350296792
nbits2lg 2403253309
expi 2423344336
Fl_mul 2442362742
addrr 2932297632
remii 3059847551
adduu 3449091436
stackdummy 3666533383
Fl_mul_pre 4239317310
leafcopy 5003800406
shift_right 5737358861
Fl_add 6140661941
dvmdsBIL 7153227615
Fl_sub 7443052109
Fl_addmul_pre 7675592334
subii 7718776211
shift_left 7799130122
uutoi 8943286649
icopy 9066509266
maxss 9738619685
utoi 12060784995
addii 12547622418
evalexpo 13403695339
utoipos 14278356480
gc_const 15648809278
cgetipos 16456603100
cgetg 25470966119
cgeti 27482649160
new_chunk 94938254233
evallg 96725317681
set_avma 131184227398

Generated by: LCOV version 1.16