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 30786-ffec283a2b) Lines: 605 680 89.0 %
Date: 2026-04-08 09:25:27 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 33737
cmprs 40996
cgetr_block 44265
sdivsi 102151
stack_calloc 110695
gc_stoi 155898
dvdui 167195
subis 171740
Fl_ellj_pre 238047
mindd 264376
truedivis 268368
cmpri 284263
mod16 307032
Mod32 311108
uutoineg 362400
Mod16 389733
cgetg_block 426430
gc_utoi 468722
dvdiu 576272
mpdiv 665522
umodui 711392
cmpsr 796100
rdivss 839647
real2n 1068617
addri 1106238
equalis 1151299
equalsi 1151481
gc_utoipos 1153608
real_0 1157699
mpround 1216570
absrnz_equal2n 1300309
cmpss 1392943
Mod8 2073826
mpcmp 2226368
Mod2 2370088
udivuu_rem 2418379
gc_int 2742448
mulru 2765892
subir 3004985
equaliu 3021705
equalui 3021706
itou_or_0 3147013
maxdd 3211760
cmpis 3634532
negr 3682622
cmpsi 3866531
ceildivuu 3903665
Fl_center 4486098
absrnz_equal1 4553951
real_1_bit 4714060
mod4 5140485
subri 6090821
subsi 6184772
truedivsi 6202087
umuluu_or_0 6304378
affsi 6446111
maxuu 6611043
mulrs 7181596
fractor 7379018
umuluu_le 7617880
gc_NULL 7961477
cmpir 9442396
ugcdiu 10320395
affectsign_safe 10731951
uabsdiviu_rem 11892741
addrs 12361203
smodss 12493927
cmpiu 12979850
cmpui 12980002
rdivii 13102528
rdiviiz 13147093
mpabs_shallow 13428463
divii 14049721
utor 14335051
affur 14335157
mod8 15585031
subrs 16536441
dvdii 16903141
Fl_halve 18750587
modis 19638526
int_bit 20952217
smodis 21176088
hammingu 24048701
evalvalser 24359582
abscmpui 32332314
abscmpiu 32332361
mulri 38284401
mpexpo 38875836
absequaliu 39546208
absequalui 41296233
Mod4 43841747
itos_or_0 44910676
modsi 45242131
affui 45491533
Fl_div 46689784
stack_malloc 46928613
umodi2n 48985233
sdivsi_rem 51446514
gc_ulong 52061584
truedivii 54711189
stack_malloc_align 55534628
affrr_fixlg 56107454
absi_shallow 56385586
gc_bool 56782847
mod2 62588637
Fl_addmulmul_pre 64529798
minuu 69632126
remlll_pre 75703584
evalprecp 78672228
evalvalp 81628736
Fl_triple 87023255
mpsqr 91027068
addiu 96727113
Fl_sqr 99427517
addui 100802052
fixlg 105718015
mod2BIL 107443422
mpodd 116092580
icopyspec 117798654
subiu 133397594
real_1 133635061
subui 138373717
mpshift 153482619
togglesign_safe 157233831
dvmduBIL 165574671
itou 179081372
gc_double 184083517
shiftr 187929922
vali 190835731
addis 194719625
varncmp 198761534
gc_long 242622216
mpsub 251548401
utoineg 297813691
cgetineg 298674658
rtor 303750716
addsi 319906154
muliu 373276692
Fl_double 441482594
shiftr_inplace 466984042
mulis 467086334
itos 476261380
real_0_bit 482138033
addir 483039028
affsr 501306229
stor 501654475
mpadd 572731280
negi 640809256
itor 716793240
Fl_neg 728978474
umodsu 734129891
expu 796832899
stoi 798992561
lg2prec 815915919
mpmul 836869661
rcopy 916724075
mpneg 926455406
affii 964097412
subrr 1006255562
cgetg_copy 1490101437
cmpuu 1490180184
cgetr 1875782546
togglesign 1953077939
minss 2026345951
absi 2066927791
mpabs 2137859389
setabssign 2204905279
Fl_sqr_pre 2334355830
nbits2lg 2402306087
expi 2424232044
Fl_mul 2437206861
addrr 2930942966
remii 3061557793
adduu 3446744745
stackdummy 3679873351
Fl_mul_pre 4212542327
leafcopy 5061399561
shift_right 5728638760
Fl_add 6147207983
dvmdsBIL 7147426055
Fl_sub 7379764961
Fl_addmul_pre 7653632492
subii 7719099682
shift_left 7795812423
uutoi 8931190199
icopy 9152280291
maxss 9689581968
utoi 12041546734
addii 12531220626
evalexpo 13396856320
utoipos 14253667155
gc_const 15648394273
cgetipos 16437321845
cgetg 25510123672
cgeti 27469374238
new_chunk 95096210260
evallg 96826888962
set_avma 131307788703

Generated by: LCOV version 1.16