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 29806-4d001396c7) Lines: 1468 1530 95.9 %
Date: 2024-12-22 09:08:28 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 289185
RgX_gtofp_bit 7003004
RgX_normalize1 35452
X2XP1 5201925
ZX_Uspensky 1057545
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15137
ZX_graeffe 5369
ZX_realroots_irred 48124
ZX_rescale2prim 1934988
ZX_sturm 3736
ZX_sturm_i 119685
ZX_sturm_irred 115949
ZX_sturmpart 875353
ZX_to_ZiX 16459955
ZiX_sqr 98795175
_gen_nored 11097659
_gen_one 14339052
_gen_zero 322110
_intervalcmp 0
_mp_add 24545453
_mp_cmul 34548588
_mp_mul 4354055
_mp_sqr 6264741
_mp_sub 0
_sqrtnr 22595
a_posteriori_errors 529220
abs_update 7988512
abs_update_r 776183
all_roots 528433
append_clone 1598438
bkeval_single_power 5183681
check_ab 925966
checkbound 1849062
checkvalidpol 266506
clean_roots 528483
cleanroots 231306
cmp_complex_appr 2222563
conformal_basecase 1400567
conformal_mapping 466819
conformal_pol 1400688
dblexp 6532197
dbllog2 299698576
dft 500909
dual_modulus 1009931
eval_rel_pol 13102225
fft 14114535
fft2 7462
findpower 40864082
fix_roots 529214
fix_roots1 393213
fujiwara_bound 2002460
fujiwara_bound_real 1147456
graeffe 49389439
homothetie 1605604
homothetie2n 9929737
homothetie_gauss 36413935
ind_maxlog2 900838
initdft 993581
isexactpol 239296
isexactscalar 930942
isreal 959492
isvalidcoeff 1224428
logmax_modulus 4440826
logmin_modulus 1611322
logmodulus 604809
logpre_modulus 604803
logradius 492672
lower_bound 40863646
mydbllog2i 223857671
mydbllog2r 55810122
mydbllogr 9526227
mygprec 63485825
mygprec_absolute 4284623
mygprec_special 529223
mygprecrc 214125885
mygprecrc_special 2152445
myshiftic 135467111
myshiftrc 35406164
newton_polygon 5489230
optimize_split 492674
parameters 492673
pol_to_gaussint 17543059
polgraeffe 14
polmod_to_embed 84
polrootsbound 27202
polrootsbound_i 27196
polsolve 165287
quicktofp 6438972
realroots 50613
refine_F 500904
refine_H 2452193
root_error 1892856
roots 8018
roots_aux 239324
roots_com 239296
rootsdeg0 42
scalepol 4278846
scalepol2n 0
sol_ok 3350
solve_exact_pol 231040
split_0 492994
split_0_1 467141
split_0_2 467141
split_1 466819
split_2 492671
split_complete 1515206
split_fromU 492674
split_pols 165284
splitcauchy 165291
splitpoleval 5183618
tocomplex 1196953
update_radius 492673
usp 939219

Generated by: LCOV version 1.16