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 30316-0578a48613) Lines: 1467 1530 95.9 %
Date: 2025-05-31 09:20:01 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 3350
ZX_sturm 3735
ZX_graeffe 5383
fft2 7462
roots 8018
ZX_deg1root 15247
_sqrtnr 22682
polrootsbound_i 27109
polrootsbound 27116
RgX_normalize1 35703
ZX_realroots_irred 48351
realroots 50613
ZX_sturm_irred 116349
ZX_sturm_i 120084
polsolve 165663
split_pols 165670
splitcauchy 165681
solve_exact_pol 231040
cleanroots 231644
isexactpol 239634
roots_com 239634
roots_aux 239662
checkvalidpol 266757
QX_complex_roots 289558
_gen_zero 323549
fix_roots1 393862
conformal_mapping 467750
split_1 467750
split_0_1 468071
split_0_2 468072
split_2 493566
logradius 493568
update_radius 493568
optimize_split 493569
parameters 493569
split_fromU 493569
split_0 493894
refine_F 501950
dft 501958
all_roots 529148
clean_roots 529191
a_posteriori_errors 530188
fix_roots 530194
mygprec_special 530196
logmodulus 606079
logpre_modulus 606079
abs_update_r 777908
ZX_sturmpart 876192
ind_maxlog2 901887
check_ab 926805
isexactscalar 931280
usp 936395
isreal 961318
initdft 995527
dual_modulus 1011640
ZX_Uspensky 1058768
fujiwara_bound_real 1148866
tocomplex 1199976
isvalidcoeff 1227233
conformal_basecase 1403358
conformal_pol 1403479
split_complete 1517974
append_clone 1601605
homothetie 1608602
logmin_modulus 1614067
checkbound 1850737
root_error 1897263
ZX_rescale2prim 1934432
fujiwara_bound 2005196
mygprecrc_special 2159156
cmp_complex_appr 2229113
refine_H 2458899
scalepol 4287113
mygprec_absolute 4296367
_mp_mul 4360559
logmax_modulus 4448358
splitpoleval 5195416
bkeval_single_power 5195663
X2XP1 5198398
newton_polygon 5501091
_mp_sqr 6273729
quicktofp 6444202
dblexp 6544720
RgX_gtofp_bit 7017621
abs_update 7999799
mydbllogr 9540754
homothetie2n 9949092
_gen_nored 11121252
eval_rel_pol 13126850
fft 14144412
_gen_one 14369684
ZX_to_ZiX 16453651
pol_to_gaussint 17575188
_mp_add 24575137
_mp_cmul 34597418
myshiftrc 35480512
homothetie_gauss 36477799
lower_bound 40934168
findpower 40935131
graeffe 49473961
mydbllog2r 56091850
mygprec 63672576
ZiX_sqr 98973480
myshiftic 135700613
mygprecrc 214922318
mydbllog2i 224223428
dbllog2 300319993

Generated by: LCOV version 1.16