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 30418-83092bf331) Lines: 1467 1530 95.9 %
Date: 2025-07-29 09:22:49 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 48621
realroots 50627
ZX_sturm_irred 116759
ZX_sturm_i 123154
polsolve 166628
split_pols 166630
splitcauchy 166638
solve_exact_pol 231040
cleanroots 231644
isexactpol 239634
roots_com 239634
roots_aux 239662
checkvalidpol 266941
QX_complex_roots 290018
_gen_zero 325998
fix_roots1 394082
split_1 467790
conformal_mapping 467792
split_0_1 468112
split_0_2 468112
logradius 493835
update_radius 493837
parameters 493839
split_2 493839
optimize_split 493840
split_fromU 493840
split_0 494161
refine_F 502228
dft 502229
all_roots 529614
clean_roots 529659
fix_roots 530655
a_posteriori_errors 530659
mygprec_special 530664
logpre_modulus 606615
logmodulus 606617
abs_update_r 778426
ind_maxlog2 902427
isexactscalar 931280
isreal 961629
initdft 996066
dual_modulus 1012189
usp 1125931
ZX_sturmpart 1128173
check_ab 1178800
tocomplex 1201028
isvalidcoeff 1229675
ZX_Uspensky 1313777
conformal_basecase 1403486
conformal_pol 1403604
fujiwara_bound_real 1406769
split_complete 1518982
append_clone 1603054
homothetie 1609686
logmin_modulus 1614387
root_error 1899236
mygprecrc_special 2161081
cmp_complex_appr 2231759
ZX_rescale2prim 2233658
fujiwara_bound 2265031
checkbound 2354730
refine_H 2459800
scalepol 4288152
mygprec_absolute 4300500
_mp_mul 4373483
logmax_modulus 4449782
splitpoleval 5223547
bkeval_single_power 5223905
newton_polygon 5505937
X2XP1 5990048
_mp_sqr 6291980
dblexp 6547407
quicktofp 6961063
RgX_gtofp_bit 7023574
abs_update 8003523
mydbllogr 9544303
homothetie2n 9955343
_gen_nored 11175319
eval_rel_pol 13135187
fft 14157445
_gen_one 14443694
ZX_to_ZiX 16455788
pol_to_gaussint 17584993
_mp_add 24651517
_mp_cmul 34729363
myshiftrc 35499711
homothetie_gauss 36492578
lower_bound 40947201
findpower 40947717
graeffe 49496029
mydbllog2r 56779446
mygprec 63701138
ZiX_sqr 99017861
myshiftic 135772257
mygprecrc 215003001
mydbllog2i 226337269
dbllog2 302609123

Generated by: LCOV version 1.16