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 30387-12623f1693) Lines: 605 680 89.0 %
Date: 2025-07-10 09:22:50 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 708
ugcdui 2737
thuemorseu 2851
stack_calloc_align 3300
varnmin 15547
uabsdivui_rem 19089
addss 25067
subss 25067
subuu 25067
dvdis 33912
cmprs 40996
cgetr_block 43481
sdivsi 102151
stack_calloc 110049
gc_stoi 155883
dvdui 167195
subis 170995
Mod32 199255
mod16 236579
Fl_ellj_pre 242773
truedivis 266825
mindd 268634
Mod16 277481
cmpri 282261
uutoineg 355591
cgetg_block 394107
gc_utoi 468545
dvdiu 576567
mpdiv 667722
cmpsr 824656
rdivss 839647
real2n 1061005
addri 1109319
gc_utoipos 1153899
real_0 1155977
equalis 1174480
equalsi 1174662
mpround 1216542
absrnz_equal2n 1288859
umodui 1296416
cmpss 1432792
Mod2 2024379
Mod8 2070299
mpcmp 2227418
gc_int 2574160
mulru 2765822
equalui 2995217
equaliu 2995218
itou_or_0 2996107
subir 3006054
maxdd 3162851
cmpis 3633422
negr 3692308
ceildivuu 3847631
cmpsi 3865371
Fl_center 4030036
absrnz_equal1 4515442
mod4 4684306
real_1_bit 4700847
maxuu 4805057
umuluu_or_0 5536069
umuluu_le 5800680
subri 6094609
subsi 6105211
truedivsi 6202031
affsi 6396401
mulrs 7181596
fractor 7375256
gc_NULL 7976951
cmpir 9446057
cmpiu 9658428
cmpui 9658480
ugcdiu 9987280
affectsign_safe 10736853
uabsdiviu_rem 11892741
addrs 12353975
smodss 12472693
rdivii 13098161
rdiviiz 13142364
mod8 13199459
mpabs_shallow 13428463
utor 13453455
affur 13453585
divii 14059058
dvdii 16490754
subrs 16512586
Fl_halve 18054710
modis 19602559
smodis 21140226
evalvalser 21443016
int_bit 22293222
hammingu 24045250
itos_or_0 24090555
abscmpiu 30652329
abscmpui 30652400
mulri 38041327
mpexpo 38843621
absequaliu 39649781
absequalui 41398682
Mod4 44351984
modsi 45223277
affui 45473824
Fl_div 46546078
stack_malloc 46628610
truedivii 46750324
umodi2n 48923592
sdivsi_rem 51427607
gc_bool 51927323
gc_ulong 51930035
stack_malloc_align 55475285
affrr_fixlg 55888337
absi_shallow 57212722
Fl_addmulmul_pre 59618649
mod2 61132226
minuu 68414195
remlll_pre 76840309
evalprecp 78668149
evalvalp 81624714
mpsqr 90951852
addiu 94206157
Fl_sqr 94854727
Fl_triple 96528145
addui 97710409
mod2BIL 102193581
fixlg 105004289
mpodd 115069841
icopyspec 116514729
togglesign_safe 125046744
subiu 130270024
real_1 131562070
subui 134508888
mpshift 153172772
udivuu_rem 159818229
dvmduBIL 163117338
itou 176158941
shiftr 180382819
addis 181275631
gc_double 184379613
vali 187874322
varncmp 217197772
gc_long 239245252
mpsub 251456056
utoineg 266489954
cgetineg 267347266
rtor 300389006
addsi 306457674
muliu 372627531
itos 458998473
mulis 464043323
Fl_double 476448327
shiftr_inplace 478469235
addir 478855880
real_0_bit 481130302
affsr 495699569
stor 495973578
mpadd 576221184
negi 636119799
itor 712652628
Fl_neg 718005527
umodsu 724090052
stoi 745423458
expu 786822653
lg2prec 807006436
mpmul 839255509
rcopy 904150856
affii 908777305
mpneg 916530126
subrr 1000138151
cmpuu 1447657054
cgetg_copy 1464523982
cgetr 1857200593
togglesign 1918993064
minss 2006512659
absi 2060243571
mpabs 2131495540
Fl_sqr_pre 2180531707
setabssign 2197834300
nbits2lg 2384975492
Fl_mul 2413604040
expi 2451970145
addrr 2879643616
remii 3011721778
adduu 3401246578
stackdummy 3642880528
Fl_mul_pre 4120134133
Fl_add 4360792636
leafcopy 4954588148
shift_right 5663461645
dvmdsBIL 7075370400
Fl_sub 7300116498
subii 7652919730
Fl_addmul_pre 7692661384
shift_left 7747602810
uutoi 8798646580
icopy 9080214698
maxss 9638674665
utoi 11859962492
addii 12373295725
evalexpo 13257192958
utoipos 14211811333
gc_const 15506073601
cgetipos 16386877189
cgetg 24611511290
cgeti 27209557286
new_chunk 93463471928
evallg 95462241857
set_avma 129143772744

Generated by: LCOV version 1.16