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.0 lcov report (development 29804-254f602fce) Lines: 1468 1530 95.9 %
Date: 2024-12-18 09:08:59 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 289189
RgX_gtofp_bit 7003067
RgX_normalize1 35451
X2XP1 5201911
ZX_Uspensky 1057566
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15138
ZX_graeffe 5369
ZX_realroots_irred 48125
ZX_rescale2prim 1934983
ZX_sturm 3736
ZX_sturm_i 119686
ZX_sturm_irred 115950
ZX_sturmpart 875373
ZX_to_ZiX 16459662
ZiX_sqr 98790570
_gen_nored 11096055
_gen_one 14337928
_gen_zero 322087
_intervalcmp 0
_mp_add 24543673
_mp_cmul 34543379
_mp_mul 4353986
_mp_sqr 6264619
_mp_sub 0
_sqrtnr 22596
a_posteriori_errors 529222
abs_update 7988759
abs_update_r 776173
all_roots 528443
append_clone 1598461
bkeval_single_power 5183319
check_ab 925986
checkbound 1849102
checkvalidpol 266505
clean_roots 528488
cleanroots 231306
cmp_complex_appr 2222579
conformal_basecase 1400571
conformal_mapping 466815
conformal_pol 1400691
dblexp 6532166
dbllog2 299691593
dft 500907
dual_modulus 1009939
eval_rel_pol 13102292
fft 14114560
fft2 7462
findpower 40862707
fix_roots 529223
fix_roots1 393219
fujiwara_bound 2002513
fujiwara_bound_real 1147479
graeffe 49388695
homothetie 1605621
homothetie2n 9929751
homothetie_gauss 36413272
ind_maxlog2 900859
initdft 993578
isexactpol 239296
isexactscalar 930942
isreal 959491
isvalidcoeff 1224421
logmax_modulus 4440807
logmin_modulus 1611321
logmodulus 604811
logpre_modulus 604806
logradius 492663
lower_bound 40862406
mydbllog2i 223849492
mydbllog2r 55810054
mydbllogr 9526568
mygprec 63485526
mygprec_absolute 4284656
mygprec_special 529229
mygprecrc 214127278
mygprecrc_special 2152471
myshiftic 135461363
myshiftrc 35405508
newton_polygon 5489266
optimize_split 492673
parameters 492669
pol_to_gaussint 17543066
polgraeffe 14
polmod_to_embed 84
polrootsbound 27202
polrootsbound_i 27195
polsolve 165285
quicktofp 6439073
realroots 50613
refine_F 500901
refine_H 2452199
root_error 1892874
roots 8018
roots_aux 239324
roots_com 239296
rootsdeg0 42
scalepol 4278836
scalepol2n 0
sol_ok 3350
solve_exact_pol 231040
split_0 492994
split_0_1 467138
split_0_2 467138
split_1 466818
split_2 492671
split_complete 1515210
split_fromU 492673
split_pols 165286
splitcauchy 165292
splitpoleval 5183471
tocomplex 1196984
update_radius 492668
usp 939225

Generated by: LCOV version 1.16