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 - language - intnum.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 1586 1633 97.1 %
Date: 2026-02-23 02:23:56 Functions: 133 134 99.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Legendrenext 82740
Legendreroot 12994
M_from_wrapmon 25
Pade 213
QD 5133
RFRAC_eval 1495
RX_realroots 213
_exfn 24230
_int_eval 17327
_invf 10692
_mpmul 1317260
add_RFRAC_eval 1495
add_sumrfrac 15
auxcirc 4255
auxeuler 26662890
auxlin 31500
checkmonroots 173
checksumtab 20
checktab 4008
checktabdoub 445
checktabsimp 8182
code_aux 3809
contfrac_Euler 4908
contfraceval 30
contfraceval_inv 3724307
contfracinit 2550
contfracinit_i 2388
divr2_ip 340754
err_code 12
euler_set_Fs 120
eulerrat_init 85
expscalpr 99297
exptab 93
expvec 186
expvecpr 186
f_getycplx 1835
get_kN 20
get_oo 150
homtab 458
id 160669
init_fin 699
initexpexp 220
initexpsinh 197
initnumsine 95
initsinh 113
initsinhsinh 12
inittanhsinh 355
intcirc 11
intcirc0 11
interp 135
intfuncinit 125
intfuncinit0 125
intfuncinit_i 113
intinit_end 992
intinit_start 992
intlin 60
intn 3491
intninfinf 503
intninfpm 445
intnsing 174
intnum 4553
intnum0 3971
intnum_i 4529
intnumainfrat 20
intnumgauexp 40
intnumgauexpinit 40
intnumgauss 17404
intnumgauss0 77
intnumgaussinit 232
intnuminit 825
intnuminit0 4529
intnuminit_i 950
intnumosc 143
intnumosc0 143
intnumromb 53
intnumromb0 53
is_fin_f 849
is_osc 107
isinC 19807
isinR 21089
logzetan 10195
monrefine 1853
monroots 138
opFps 85
osc_wrap 8262
osc_wrap_prec 9065
polmax 155
prodeulerrat 60
prodnumrat 20
qrom2 54
qrom3 11
qromi 24
quodif 0
quodif_i 4938
ratpolemax 15
ratpolemax2 50
rfrac_eval 1495
rfrac_eval0 20
rfrac_evalfp 630
rfrac_gtofp 65
rfrac_logderiv 45
rfracm1_degree 60
rom_bsmall 24
rombint 30
sdmob 13295
sercoeff 57970
sumaux 10
sumeulerrat 60
sumlogzeta 85
sumnum 100
sumnum0 70
sumnumap 45
sumnumap0 45
sumnumapinit 40
sumnuminit 90
sumnumlagrange 65
sumnumlagrange0 65
sumnumlagrange1init 35
sumnumlagrange2init 5
sumnumlagrangeinit 55
sumnumlagrangeinit_i 40
sumnummonien 178
sumnummonien0 130
sumnummonieninit 128
sumnummonieninit_i 178
sumnumrat 40
sumnumrat_i 20
sumnumsidi 109
sumnumsidi0 20
transcode 20272
veczetaprime 5
weight 226
wrapmonw 24432
wrapmonw2 13377

Generated by: LCOV version 1.16