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

Generated by: LCOV version 1.16