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 30835-e55edf4b45) Lines: 1467 1530 95.9 %
Date: 2026-04-25 09:26:46 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 8382
ZX_deg1root 15204
_sqrtnr 22597
polrootsbound_i 27097
polrootsbound 27104
RgX_normalize1 35705
ZX_realroots_irred 48574
realroots 50627
ZX_sturm_irred 116678
ZX_sturm_i 123073
polsolve 166709
split_pols 166709
splitcauchy 166715
solve_exact_pol 231509
cleanroots 231763
isexactpol 240117
roots_com 240117
roots_aux 240145
checkvalidpol 267228
QX_complex_roots 296303
_gen_zero 325998
fix_roots1 398801
split_1 468818
conformal_mapping 468819
split_0_1 469189
split_0_2 469189
logradius 494960
update_radius 494962
parameters 494963
split_2 494963
optimize_split 494964
split_fromU 494964
split_0 495334
refine_F 503361
dft 503364
all_roots 536376
clean_roots 536420
fix_roots 537478
a_posteriori_errors 537481
mygprec_special 537485
logpre_modulus 608273
logmodulus 608275
abs_update_r 780162
ind_maxlog2 904413
isexactscalar 934122
isreal 963782
initdft 998326
dual_modulus 1014561
usp 1126164
ZX_sturmpart 1128381
check_ab 1179008
tocomplex 1215956
isvalidcoeff 1230557
ZX_Uspensky 1313980
conformal_basecase 1406564
conformal_pol 1406683
fujiwara_bound_real 1407067
split_complete 1528146
homothetie 1613704
append_clone 1616242
logmin_modulus 1617811
root_error 1914496
mygprecrc_special 2181497
ZX_rescale2prim 2233961
cmp_complex_appr 2241598
fujiwara_bound 2272951
checkbound 2355145
refine_H 2464725
scalepol 4297715
mygprec_absolute 4344353
_mp_mul 4374530
logmax_modulus 4458905
bkeval_single_power 5234861
splitpoleval 5235292
newton_polygon 5521220
X2XP1 5990975
_mp_sqr 6298366
dblexp 6563082
quicktofp 6984605
RgX_gtofp_bit 7048669
abs_update 8021933
mydbllogr 9566715
homothetie2n 9979790
_gen_nored 11199762
eval_rel_pol 13169646
fft 14196505
_gen_one 14472211
ZX_to_ZiX 16494604
pol_to_gaussint 17628558
_mp_add 24660582
_mp_cmul 34762250
myshiftrc 35579792
homothetie_gauss 36563799
lower_bound 41030361
findpower 41030594
graeffe 49603293
mydbllog2r 57620330
mygprec 63865848
ZiX_sqr 99231078
myshiftic 136059146
mygprecrc 215586934
mydbllog2i 226763666
dbllog2 303904880

Generated by: LCOV version 1.16