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 30851-7844d7b3a5) Lines: 1467 1530 95.9 %
Date: 2026-05-02 09:26:58 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 27230
polrootsbound 27237
RgX_normalize1 35838
ZX_realroots_irred 48574
realroots 50627
ZX_sturm_irred 116683
ZX_sturm_i 123078
polsolve 166700
split_pols 166703
splitcauchy 166713
solve_exact_pol 231509
cleanroots 231763
isexactpol 240117
roots_com 240117
roots_aux 240145
checkvalidpol 267361
QX_complex_roots 296326
_gen_zero 326028
fix_roots1 398818
conformal_mapping 468812
split_1 468813
split_0_1 469181
split_0_2 469181
logradius 494955
split_2 494958
update_radius 494958
split_fromU 494960
optimize_split 494961
parameters 494961
split_0 495332
refine_F 503355
dft 503361
all_roots 536393
clean_roots 536441
fix_roots 537500
a_posteriori_errors 537501
mygprec_special 537506
logmodulus 608276
logpre_modulus 608280
abs_update_r 780190
ind_maxlog2 904390
isexactscalar 934122
isreal 963773
initdft 998321
dual_modulus 1014552
usp 1126141
ZX_sturmpart 1128318
check_ab 1178946
tocomplex 1215994
isvalidcoeff 1231117
ZX_Uspensky 1313921
conformal_basecase 1406548
conformal_pol 1406667
fujiwara_bound_real 1407008
split_complete 1528163
homothetie 1613696
append_clone 1616283
logmin_modulus 1617773
root_error 1914544
mygprecrc_special 2181566
ZX_rescale2prim 2233983
cmp_complex_appr 2241635
fujiwara_bound 2274066
checkbound 2355020
refine_H 2464698
scalepol 4297657
mygprec_absolute 4344505
_mp_mul 4374554
logmax_modulus 4458980
splitpoleval 5235104
bkeval_single_power 5235875
newton_polygon 5521326
X2XP1 5990984
_mp_sqr 6298479
dblexp 6563010
quicktofp 6987912
RgX_gtofp_bit 7048790
abs_update 8021364
mydbllogr 9566082
homothetie2n 9979896
_gen_nored 11198533
eval_rel_pol 13169503
fft 14196398
_gen_one 14472564
ZX_to_ZiX 16491750
pol_to_gaussint 17628452
_mp_add 24660512
_mp_cmul 34760780
myshiftrc 35579989
homothetie_gauss 36564103
findpower 41031781
lower_bound 41031827
graeffe 49603285
mydbllog2r 57622237
mygprec 63864963
ZiX_sqr 99232645
myshiftic 136064916
mygprecrc 215571275
mydbllog2i 226764929
dbllog2 303897126

Generated by: LCOV version 1.16