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 30640-c2c58e18c5) Lines: 1467 1530 95.9 %
Date: 2026-01-27 08:51:18 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 221764
RgX_gtofp_bit 6182179
RgX_normalize1 30687
X2XP1 5726390
ZX_Uspensky 1219153
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 10849
ZX_graeffe 5036
ZX_realroots_irred 40829
ZX_rescale2prim 2138465
ZX_sturm 6395
ZX_sturm_i 102483
ZX_sturm_irred 96088
ZX_sturmpart 1052322
ZX_to_ZiX 13453476
ZiX_sqr 89566361
_gen_nored 10436737
_gen_one 13534840
_gen_zero 308497
_intervalcmp 0
_mp_add 23466314
_mp_cmul 32913205
_mp_mul 4120347
_mp_sqr 5957588
_mp_sub 0
_sqrtnr 17990
a_posteriori_errors 462568
abs_update 7011078
abs_update_r 728845
all_roots 461477
append_clone 1406836
bkeval_single_power 4894717
check_ab 1102949
checkbound 2203028
checkvalidpol 261846
clean_roots 461512
cleanroots 231763
cmp_complex_appr 1823747
conformal_basecase 1279808
conformal_mapping 426564
conformal_pol 1279925
dblexp 5886100
dbllog2 268465334
dft 457362
dual_modulus 918044
eval_rel_pol 11688742
fft 12248925
fft2 7462
findpower 37254830
fix_roots 462570
fix_roots1 374634
fujiwara_bound 2041782
fujiwara_bound_real 1298694
graeffe 44777969
homothetie 1447925
homothetie2n 8920374
homothetie_gauss 33196819
ind_maxlog2 827472
initdft 907320
isexactpol 239753
isexactscalar 931714
isreal 876532
isvalidcoeff 1196697
logmax_modulus 4052785
logmin_modulus 1473631
logmodulus 537637
logpre_modulus 537639
logradius 449961
lower_bound 37254422
mydbllog2i 201174438
mydbllog2r 51665613
mydbllogr 8397548
mygprec 57288668
mygprec_absolute 3485752
mygprec_special 462571
mygprecrc 186495787
mygprecrc_special 1897183
myshiftic 120981338
myshiftrc 31514360
newton_polygon 4867961
optimize_split 449963
parameters 449960
pol_to_gaussint 15741441
polgraeffe 14
polmod_to_embed 84
polrootsbound 22086
polrootsbound_i 22079
polsolve 155649
quicktofp 6236534
realroots 50627
refine_F 457355
refine_H 2247073
root_error 1603231
roots 8018
roots_aux 239781
roots_com 239753
rootsdeg0 42
scalepol 3909198
scalepol2n 0
sol_ok 3378
solve_exact_pol 231145
split_0 450330
split_0_1 426931
split_0_2 426931
split_1 426569
split_2 449961
split_complete 1363221
split_fromU 449963
split_pols 155648
splitcauchy 155656
splitpoleval 4895514
tocomplex 942182
update_radius 449956
usp 1054847

Generated by: LCOV version 1.16