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 30145-32f0acf4da) Lines: 1467 1530 95.9 %
Date: 2025-04-18 09:18:41 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 15212
_sqrtnr 22647
polrootsbound_i 27034
polrootsbound 27041
RgX_normalize1 35628
ZX_realroots_irred 48309
realroots 50613
ZX_sturm_irred 116277
ZX_sturm_i 120012
split_pols 165658
polsolve 165663
splitcauchy 165670
solve_exact_pol 231040
cleanroots 231644
isexactpol 239634
roots_com 239634
roots_aux 239662
checkvalidpol 266682
QX_complex_roots 289487
_gen_zero 323598
fix_roots1 393852
conformal_mapping 467735
split_1 467736
split_0_1 468059
split_0_2 468059
logradius 493536
update_radius 493539
parameters 493540
split_2 493540
optimize_split 493543
split_fromU 493543
split_0 493862
refine_F 501928
dft 501931
all_roots 529072
clean_roots 529120
fix_roots 530120
a_posteriori_errors 530127
mygprec_special 530129
logpre_modulus 606025
logmodulus 606028
abs_update_r 777862
ZX_sturmpart 876918
ind_maxlog2 901837
check_ab 927532
isexactscalar 931280
usp 936944
isreal 961279
initdft 995474
dual_modulus 1011594
ZX_Uspensky 1059460
fujiwara_bound_real 1149562
tocomplex 1199229
isvalidcoeff 1226651
conformal_basecase 1403316
conformal_pol 1403435
split_complete 1517847
append_clone 1601479
homothetie 1608531
logmin_modulus 1614016
checkbound 1852191
root_error 1896459
ZX_rescale2prim 1935535
fujiwara_bound 2005684
mygprecrc_special 2158964
cmp_complex_appr 2226056
refine_H 2458771
scalepol 4286933
mygprec_absolute 4294069
_mp_mul 4360468
logmax_modulus 4448110
bkeval_single_power 5194698
splitpoleval 5194860
X2XP1 5201152
newton_polygon 5500634
_mp_sqr 6273183
quicktofp 6445074
dblexp 6544462
RgX_gtofp_bit 7017116
abs_update 7998890
mydbllogr 9539746
homothetie2n 9948248
_gen_nored 11120987
eval_rel_pol 13126078
fft 14143241
_gen_one 14368415
ZX_to_ZiX 16450533
pol_to_gaussint 17574138
_mp_add 24575064
_mp_cmul 34597608
myshiftrc 35477862
homothetie_gauss 36476120
lower_bound 40930140
findpower 40932059
graeffe 49472789
mydbllog2r 55919175
mygprec 63632559
ZiX_sqr 98966123
myshiftic 135732034
mygprecrc 214789196
mydbllog2i 224205666
dbllog2 300142408

Generated by: LCOV version 1.16