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 30571-c0dfe82732) Lines: 1467 1530 95.9 %
Date: 2025-12-09 09:22:05 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 296484
RgX_gtofp_bit 7031663
RgX_normalize1 35908
X2XP1 5990670
ZX_Uspensky 1313932
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15273
ZX_graeffe 5390
ZX_realroots_irred 48654
ZX_rescale2prim 2233894
ZX_sturm 6395
ZX_sturm_i 123199
ZX_sturm_irred 116805
ZX_sturmpart 1128263
ZX_to_ZiX 16459040
ZiX_sqr 99029849
_gen_nored 11203413
_gen_one 14473729
_gen_zero 326149
_intervalcmp 0
_mp_add 24662911
_mp_cmul 34767949
_mp_mul 4374507
_mp_sqr 6298316
_mp_sub 0
_sqrtnr 22708
a_posteriori_errors 537292
abs_update 8005681
abs_update_r 778654
all_roots 536190
append_clone 1614294
bkeval_single_power 5236241
check_ab 1178890
checkbound 2354910
checkvalidpol 267067
clean_roots 536233
cleanroots 231763
cmp_complex_appr 2238700
conformal_basecase 1403922
conformal_mapping 467938
conformal_pol 1404043
dblexp 6549161
dbllog2 302121503
dft 502372
dual_modulus 1012476
eval_rel_pol 13138357
fft 14159665
fft2 7462
findpower 40955816
fix_roots 537295
fix_roots1 398486
fujiwara_bound 2271969
fujiwara_bound_real 1406976
graeffe 49508392
homothetie 1610123
homothetie2n 9957943
homothetie_gauss 36497577
ind_maxlog2 902690
initdft 996358
isexactpol 239753
isexactscalar 931714
isreal 961920
isvalidcoeff 1230270
logmax_modulus 4451054
logmin_modulus 1614850
logmodulus 606763
logpre_modulus 606759
logradius 493980
lower_bound 40955889
mydbllog2i 226440164
mydbllog2r 56185226
mydbllogr 9547169
mygprec 63759272
mygprec_absolute 4340526
mygprec_special 537298
mygprecrc 215200164
mygprecrc_special 2179384
myshiftic 135832284
myshiftrc 35507573
newton_polygon 5507224
optimize_split 493987
parameters 493985
pol_to_gaussint 17589345
polgraeffe 14
polmod_to_embed 84
polrootsbound 27307
polrootsbound_i 27300
polsolve 166722
quicktofp 6979607
realroots 50627
refine_F 502367
refine_H 2460525
root_error 1912755
roots 8018
roots_aux 239781
roots_com 239753
rootsdeg0 42
scalepol 4289483
scalepol2n 0
sol_ok 3378
solve_exact_pol 231145
split_0 494349
split_0_1 468302
split_0_2 468302
split_1 467934
split_2 493982
split_complete 1525980
split_fromU 493987
split_pols 166722
splitcauchy 166729
splitpoleval 5235826
tocomplex 1214161
update_radius 493985
usp 1126104

Generated by: LCOV version 1.16