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 - basemath - rootpol.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30213-f9b05da6c0) Lines: 1467 1530 95.9 %
Date: 2025-04-26 09:18:30 Functions: 116 119 97.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FFT 56
FFT_i 98
FFTinv 56
QX_complex_roots 289538
RgX_gtofp_bit 7017529
RgX_normalize1 35649
X2XP1 5201873
ZX_Uspensky 1059467
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15209
ZX_graeffe 5383
ZX_realroots_irred 48305
ZX_rescale2prim 1935824
ZX_sturm 3735
ZX_sturm_i 120034
ZX_sturm_irred 116299
ZX_sturmpart 876911
ZX_to_ZiX 16451975
ZiX_sqr 98969354
_gen_nored 11121182
_gen_one 14369686
_gen_zero 323627
_intervalcmp 0
_mp_add 24575032
_mp_cmul 34597343
_mp_mul 4360531
_mp_sqr 6273314
_mp_sub 0
_sqrtnr 22644
a_posteriori_errors 530175
abs_update 7999428
abs_update_r 777901
all_roots 529129
append_clone 1601595
bkeval_single_power 5195335
check_ab 927524
checkbound 1852178
checkvalidpol 266703
clean_roots 529169
cleanroots 231644
cmp_complex_appr 2226201
conformal_basecase 1403317
conformal_mapping 467733
conformal_pol 1403437
dblexp 6544647
dbllog2 300145519
dft 501949
dual_modulus 1011629
eval_rel_pol 13126629
fft 14144312
fft2 7462
findpower 40931638
fix_roots 530171
fix_roots1 393870
fujiwara_bound 2005773
fujiwara_bound_real 1149579
graeffe 49474209
homothetie 1608586
homothetie2n 9948794
homothetie_gauss 36475535
ind_maxlog2 901872
initdft 995506
isexactpol 239634
isexactscalar 931280
isreal 961290
isvalidcoeff 1226826
logmax_modulus 4448172
logmin_modulus 1614016
logmodulus 606072
logpre_modulus 606068
logradius 493551
lower_bound 40931892
mydbllog2i 224215681
mydbllog2r 55920702
mydbllogr 9540316
mygprec 63635735
mygprec_absolute 4294505
mygprec_special 530180
mygprecrc 214805871
mygprecrc_special 2159138
myshiftic 135714194
myshiftrc 35480080
newton_polygon 5501009
optimize_split 493558
parameters 493558
pol_to_gaussint 17574744
polgraeffe 14
polmod_to_embed 84
polrootsbound 27062
polrootsbound_i 27055
polsolve 165666
quicktofp 6445521
realroots 50613
refine_F 501944
refine_H 2458823
root_error 1896615
roots 8018
roots_aux 239662
roots_com 239634
rootsdeg0 42
scalepol 4286966
scalepol2n 0
sol_ok 3350
solve_exact_pol 231040
split_0 493881
split_0_1 468055
split_0_2 468056
split_1 467734
split_2 493556
split_complete 1517939
split_fromU 493558
split_pols 165658
splitcauchy 165666
splitpoleval 5195034
tocomplex 1199369
update_radius 493556
usp 937041

Generated by: LCOV version 1.16