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 30735-65f72320ad) Lines: 1467 1530 95.9 %
Date: 2026-03-08 09:23:56 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 5439
ZX_sturm 6395
fft2 7462
roots 8018
ZX_deg1root 15203
_sqrtnr 22595
polrootsbound_i 27095
polrootsbound 27102
RgX_normalize1 35703
ZX_realroots_irred 48572
realroots 50627
ZX_sturm_irred 116672
ZX_sturm_i 123068
polsolve 166707
splitcauchy 166707
split_pols 166708
solve_exact_pol 231145
cleanroots 231763
isexactpol 239753
roots_com 239753
roots_aux 239781
checkvalidpol 266862
QX_complex_roots 296301
_gen_zero 326012
fix_roots1 398479
split_1 468056
conformal_mapping 468059
split_0_1 468422
split_0_2 468422
split_2 494148
logradius 494150
update_radius 494151
parameters 494152
split_fromU 494153
optimize_split 494154
split_0 494515
refine_F 502540
dft 502542
all_roots 536012
clean_roots 536060
a_posteriori_errors 537106
fix_roots 537113
mygprec_special 537120
logmodulus 607103
logpre_modulus 607103
abs_update_r 779103
ind_maxlog2 903069
isexactscalar 931714
isreal 962209
initdft 996694
dual_modulus 1012845
usp 1126170
ZX_sturmpart 1128324
check_ab 1178987
tocomplex 1213851
isvalidcoeff 1228059
ZX_Uspensky 1313957
conformal_basecase 1404292
conformal_pol 1404412
fujiwara_bound_real 1407022
split_complete 1526143
homothetie 1610824
append_clone 1614338
logmin_modulus 1615192
root_error 1912450
mygprecrc_special 2179223
ZX_rescale2prim 2233920
cmp_complex_appr 2238481
fujiwara_bound 2271698
checkbound 2355104
refine_H 2461227
scalepol 4290718
mygprec_absolute 4339634
_mp_mul 4374671
logmax_modulus 4451876
bkeval_single_power 5235626
splitpoleval 5236238
newton_polygon 5510582
X2XP1 5990937
_mp_sqr 6298533
dblexp 6551737
quicktofp 6979450
RgX_gtofp_bit 7035446
abs_update 8008627
mydbllogr 9550500
homothetie2n 9962164
_gen_nored 11206576
eval_rel_pol 13144768
fft 14165934
_gen_one 14474580
ZX_to_ZiX 16452460
pol_to_gaussint 17596844
_mp_add 24665694
_mp_cmul 34775587
myshiftrc 35520027
homothetie_gauss 36506268
lower_bound 40966048
findpower 40966864
graeffe 49530453
mydbllog2r 56190138
mygprec 63777734
ZiX_sqr 99073637
myshiftic 135920202
mygprecrc 215233874
mydbllog2i 226502862
dbllog2 302213258

Generated by: LCOV version 1.16