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 30571-c0dfe82732) Lines: 1467 1530 95.9 %
Date: 2025-12-10 09:22:03 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 5390
ZX_sturm 6395
fft2 7462
roots 8018
ZX_deg1root 15275
_sqrtnr 22710
polrootsbound_i 27298
polrootsbound 27305
RgX_normalize1 35906
ZX_realroots_irred 48652
realroots 50627
ZX_sturm_irred 116805
ZX_sturm_i 123200
split_pols 166717
polsolve 166719
splitcauchy 166725
solve_exact_pol 231145
cleanroots 231763
isexactpol 239753
roots_com 239753
roots_aux 239781
checkvalidpol 267065
QX_complex_roots 296487
_gen_zero 326140
fix_roots1 398488
split_1 467935
conformal_mapping 467937
split_0_1 468300
split_0_2 468301
logradius 493985
parameters 493989
update_radius 493990
split_2 493991
optimize_split 493992
split_fromU 493992
split_0 494357
refine_F 502372
dft 502381
all_roots 536199
clean_roots 536242
a_posteriori_errors 537290
fix_roots 537296
mygprec_special 537302
logmodulus 606780
logpre_modulus 606781
abs_update_r 778681
ind_maxlog2 902714
isexactscalar 931714
isreal 961926
initdft 996371
dual_modulus 1012492
usp 1126061
ZX_sturmpart 1128243
check_ab 1178870
tocomplex 1214188
isvalidcoeff 1230264
ZX_Uspensky 1313910
conformal_basecase 1403926
conformal_pol 1404044
fujiwara_bound_real 1406949
split_complete 1526005
homothetie 1610153
append_clone 1614330
logmin_modulus 1614856
root_error 1912804
mygprecrc_special 2179407
ZX_rescale2prim 2233705
cmp_complex_appr 2238744
fujiwara_bound 2271960
checkbound 2354870
refine_H 2460547
scalepol 4289504
mygprec_absolute 4340666
_mp_mul 4374541
logmax_modulus 4451077
bkeval_single_power 5235800
splitpoleval 5235868
newton_polygon 5507406
X2XP1 5990254
_mp_sqr 6298219
dblexp 6549309
quicktofp 6979527
RgX_gtofp_bit 7031866
abs_update 8005440
mydbllogr 9546949
homothetie2n 9958149
_gen_nored 11203846
eval_rel_pol 13138758
fft 14159793
_gen_one 14473140
ZX_to_ZiX 16458009
pol_to_gaussint 17589775
_mp_add 24662689
_mp_cmul 34768031
myshiftrc 35508835
homothetie_gauss 36499186
findpower 40956702
lower_bound 40956884
graeffe 49509925
mydbllog2r 56185661
mygprec 63760483
ZiX_sqr 99033799
myshiftic 135842458
mygprecrc 215203285
mydbllog2i 226454215
dbllog2 302139771

Generated by: LCOV version 1.16