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 30536-6f6fcf9613) Lines: 605 680 89.0 %
Date: 2025-11-01 09:21:23 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 33912
cmprs 40996
cgetr_block 43604
sdivsi 102151
stack_calloc 110572
gc_stoi 155883
dvdui 167195
subis 170994
mod16 241353
Fl_ellj_pre 242641
truedivis 266813
mindd 270158
cmpri 282310
Mod32 311108
uutoineg 355023
Mod16 389733
cgetg_block 393710
gc_utoi 468542
dvdiu 576571
mpdiv 667712
cmpsr 795893
rdivss 839647
real2n 1067401
addri 1109246
gc_utoipos 1153838
real_0 1156096
equalis 1181645
equalsi 1181827
mpround 1216550
absrnz_equal2n 1291361
umodui 1296416
cmpss 1427033
Mod8 2075129
mpcmp 2227492
udivuu_rem 2416391
Mod2 2479841
gc_int 2574279
mulru 2765822
subir 3006707
equaliu 3018648
equalui 3018651
itou_or_0 3041663
maxdd 3176177
cmpis 3633585
negr 3668406
ceildivuu 3849528
cmpsi 3865558
Fl_center 4485590
absrnz_equal1 4518129
mod4 4700744
real_1_bit 4706007
maxuu 4804819
umuluu_or_0 5513285
umuluu_le 5803235
subsi 6117259
subri 6135252
truedivsi 6202031
affsi 6383307
mulrs 7181596
fractor 7376011
gc_NULL 7968607
cmpir 9428495
ugcdiu 10081913
cmpiu 10118634
cmpui 10118676
affectsign_safe 10735959
uabsdiviu_rem 11892741
addrs 12303412
smodss 12500007
rdivii 13098159
rdiviiz 13143124
mod8 13271098
mpabs_shallow 13428463
utor 13462245
affur 13462351
divii 14060591
subrs 16475222
dvdii 16551567
Fl_halve 18032793
modis 19638526
smodis 21176263
evalvalser 21443044
int_bit 22276198
hammingu 24045795
abscmpiu 33867689
abscmpui 33867746
mulri 38033054
mpexpo 38856668
absequaliu 39663125
absequalui 41412023
itos_or_0 43595428
Mod4 43780532
modsi 45225527
affui 45473824
Fl_div 46527200
stack_malloc 46641451
truedivii 46789219
umodi2n 49036299
sdivsi_rem 51429855
gc_bool 51989954
gc_ulong 52168618
affrr_fixlg 54637835
stack_malloc_align 55492497
absi_shallow 58924377
Fl_addmulmul_pre 60117704
mod2 61152651
minuu 69072424
remlll_pre 75458095
evalprecp 78667830
evalvalp 81625102
mpsqr 90979409
Fl_sqr 94881954
Fl_triple 95772234
addiu 98184237
addui 101833944
mod2BIL 103359734
fixlg 104135464
mpodd 115081724
icopyspec 117026883
togglesign_safe 125493926
real_1 129776195
subiu 131675210
subui 136368847
mpshift 153177593
dvmduBIL 165719117
itou 177092505
shiftr 177925388
addis 181578195
gc_double 184384735
vali 190340250
varncmp 217203621
gc_long 241813192
mpsub 251544654
utoineg 294153468
cgetineg 295010802
rtor 295209961
addsi 306762101
muliu 373364530
itos 461690361
mulis 463120497
shiftr_inplace 463707496
Fl_double 474701296
real_0_bit 479107508
addir 479843099
affsr 485926538
stor 486244836
mpadd 574372812
negi 636742490
itor 713186059
Fl_neg 716518762
umodsu 724229228
stoi 772623770
expu 775132463
lg2prec 797864256
mpmul 837507290
rcopy 902604615
affii 909028645
mpneg 916660174
subrr 1000111322
cgetg_copy 1479704275
cmpuu 1493003679
cgetr 1838175738
togglesign 1911032935
minss 2008295145
absi 2060310658
mpabs 2131081392
Fl_sqr_pre 2163407911
setabssign 2197759640
nbits2lg 2362055709
Fl_mul 2415289099
expi 2452839497
addrr 2876073566
remii 3011772437
adduu 3413300680
stackdummy 3648340730
Fl_mul_pre 4084329245
Fl_add 4354084378
leafcopy 4964245185
shift_right 5624149299
dvmdsBIL 7012342744
Fl_sub 7313799851
Fl_addmul_pre 7651307020
subii 7663224890
shift_left 7681034441
uutoi 8807610171
icopy 9055037775
maxss 9744650944
utoi 11898284622
addii 12406117083
evalexpo 13125392628
utoipos 14142462148
gc_const 15512953844
cgetipos 16302857095
cgetg 24542130215
cgeti 27121182708
new_chunk 93232629034
evallg 95232192674
set_avma 128983511671

Generated by: LCOV version 1.16