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 30660-09c6d0ed2e) Lines: 1467 1530 95.9 %
Date: 2026-02-01 09:23:44 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 15201
_sqrtnr 22593
polrootsbound_i 27123
polrootsbound 27130
RgX_normalize1 35731
ZX_realroots_irred 48564
realroots 50627
ZX_sturm_irred 116579
ZX_sturm_i 122974
polsolve 166690
split_pols 166692
splitcauchy 166700
solve_exact_pol 231145
cleanroots 231763
isexactpol 239753
roots_com 239753
roots_aux 239781
checkvalidpol 266890
QX_complex_roots 296177
_gen_zero 325977
fix_roots1 398355
conformal_mapping 467805
split_1 467808
split_0_1 468173
split_0_2 468173
logradius 493860
split_2 493861
parameters 493862
split_fromU 493862
optimize_split 493863
update_radius 493863
split_0 494228
refine_F 502247
dft 502251
all_roots 535887
clean_roots 535933
a_posteriori_errors 536989
fix_roots 536990
mygprec_special 536994
logpre_modulus 606565
logmodulus 606569
abs_update_r 778530
ind_maxlog2 902522
isexactscalar 931714
isreal 961669
initdft 996113
dual_modulus 1012249
usp 1125962
ZX_sturmpart 1128243
check_ab 1178870
tocomplex 1213232
isvalidcoeff 1228143
ZX_Uspensky 1313742
conformal_basecase 1403537
conformal_pol 1403657
fujiwara_bound_real 1406719
split_complete 1525445
homothetie 1609698
append_clone 1613557
logmin_modulus 1614416
root_error 1911685
mygprecrc_special 2178321
ZX_rescale2prim 2233591
cmp_complex_appr 2237335
fujiwara_bound 2271159
checkbound 2354870
refine_H 2460067
scalepol 4288349
mygprec_absolute 4337643
_mp_mul 4374568
logmax_modulus 4449748
bkeval_single_power 5235240
splitpoleval 5235793
newton_polygon 5505407
X2XP1 5989964
_mp_sqr 6298197
dblexp 6547526
quicktofp 6977133
RgX_gtofp_bit 7029271
abs_update 8004557
mydbllogr 9545410
homothetie2n 9954927
_gen_nored 11206413
eval_rel_pol 13134837
fft 14155734
_gen_one 14471630
ZX_to_ZiX 16455359
pol_to_gaussint 17584645
_mp_add 24663813
_mp_cmul 34773316
myshiftrc 35496209
homothetie_gauss 36495201
lower_bound 40947903
findpower 40948689
graeffe 49505114
mydbllog2r 56173401
mygprec 63746247
ZiX_sqr 99024526
myshiftic 135853665
mygprecrc 215150341
mydbllog2i 226413332
dbllog2 302108746

Generated by: LCOV version 1.16