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 30368-f792e9816c) Lines: 1467 1530 95.9 %
Date: 2025-07-04 09:22:57 Functions: 116 119 97.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_intervalcmp 0
_mp_sub 0
scalepol2n 0
ZX_Uspensky_equal_yes 14
polgraeffe 14
ZX_Uspensky_no 21
ZX_Uspensky_equal 28
rootsdeg0 42
FFT 56
FFTinv 56
polmod_to_embed 84
FFT_i 98
sol_ok 3378
ZX_graeffe 5383
ZX_sturm 6395
fft2 7462
roots 8018
ZX_deg1root 15274
_sqrtnr 22709
polrootsbound_i 27293
polrootsbound 27300
RgX_normalize1 35887
ZX_realroots_irred 48623
realroots 50627
ZX_sturm_irred 116760
ZX_sturm_i 123155
polsolve 166627
split_pols 166629
splitcauchy 166640
solve_exact_pol 231040
cleanroots 231644
isexactpol 239634
roots_com 239634
roots_aux 239662
checkvalidpol 266941
QX_complex_roots 290016
_gen_zero 325991
fix_roots1 394085
conformal_mapping 467785
split_1 467787
split_0_1 468111
split_0_2 468111
logradius 493832
parameters 493833
split_2 493833
update_radius 493834
optimize_split 493835
split_fromU 493835
split_0 494157
refine_F 502217
dft 502225
all_roots 529608
clean_roots 529652
fix_roots 530654
a_posteriori_errors 530655
mygprec_special 530659
logmodulus 606599
logpre_modulus 606605
abs_update_r 778410
ind_maxlog2 902409
isexactscalar 931280
isreal 961621
initdft 996059
dual_modulus 1012180
usp 1125927
ZX_sturmpart 1128222
check_ab 1178849
tocomplex 1200998
isvalidcoeff 1229675
ZX_Uspensky 1313829
conformal_basecase 1403483
conformal_pol 1403600
fujiwara_bound_real 1406814
split_complete 1518965
append_clone 1603027
homothetie 1609663
logmin_modulus 1614396
root_error 1899194
mygprecrc_special 2161060
cmp_complex_appr 2231716
ZX_rescale2prim 2233632
fujiwara_bound 2265051
checkbound 2354828
refine_H 2459792
scalepol 4288128
mygprec_absolute 4300429
_mp_mul 4373400
logmax_modulus 4449772
splitpoleval 5223734
bkeval_single_power 5223988
newton_polygon 5505859
X2XP1 5990023
_mp_sqr 6291997
dblexp 6547329
quicktofp 6960932
RgX_gtofp_bit 7023457
abs_update 8003914
mydbllogr 9544706
homothetie2n 9955276
_gen_nored 11176121
eval_rel_pol 13135047
fft 14157615
_gen_one 14443671
ZX_to_ZiX 16457913
pol_to_gaussint 17584820
_mp_add 24651182
_mp_cmul 34728347
myshiftrc 35499101
homothetie_gauss 36491908
lower_bound 40948133
findpower 40949003
graeffe 49496144
mydbllog2r 56780350
mygprec 63700930
ZiX_sqr 99017948
myshiftic 135776009
mygprecrc 215010635
mydbllog2i 224326500
dbllog2 300608009

Generated by: LCOV version 1.16