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.16.2 lcov report (development 29115-f22e516b23) Lines: 1480 1543 95.9 %
Date: 2024-05-05 08:08:07 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 289032
RgX_gtofp_bit 6738091
RgX_normalize1 35233
X2XP1 1276958
ZX_Uspensky 182110
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 14443
ZX_graeffe 5306
ZX_realroots_irred 47414
ZX_rescale2prim 415689
ZX_sturm 1414
ZX_sturm_i 116089
ZX_sturm_irred 114675
ZX_sturmpart 3074
ZX_to_ZiX 16190692
ZiX_sqr 94677080
_gen_nored 11046217
_gen_one 14286872
_gen_zero 321008
_intervalcmp 0
_mp_add 24370147
_mp_cmul 34333613
_mp_mul 4316870
_mp_sqr 6228156
_mp_sub 0
_sqrtnr 22216
a_posteriori_errors 510655
abs_update 7726953
abs_update_r 736050
all_roots 509844
append_clone 1536748
bkeval_single_power 5166798
check_ab 53610
checkbound 105596
checkvalidpol 247845
clean_roots 509884
cleanroots 212968
cmp_complex_appr 2152096
conformal_basecase 1337340
conformal_mapping 445742
conformal_pol 1337457
dblexp 6260258
dbllog2 290617450
dft 478705
dual_modulus 965469
eval_rel_pol 12577972
fft 13731948
fft2 7462
findpower 39134754
fix_roots 510656
fix_roots1 375331
fujiwara_bound 1097582
fujiwara_bound_real 269193
graeffe 47328733
homothetie 1537574
homothetie2n 9526378
homothetie_gauss 34875432
ind_maxlog2 858608
initdft 949418
isexactpol 220853
isexactscalar 858319
isreal 916453
isvalidcoeff 1148238
logmax_modulus 4251614
logmin_modulus 1541551
logmodulus 581039
logpre_modulus 581036
logradius 470709
lower_bound 39134126
mydbllog2i 215850476
mydbllog2r 52750520
mydbllogr 9199129
mygprec 61051067
mygprec_absolute 4173822
mygprec_special 510657
mygprecrc 207554507
mygprecrc_special 2072223
myshiftic 130490863
myshiftrc 34083342
newton_polygon 5275155
optimize_split 470715
parameters 470710
pol_to_gaussint 16829736
polgraeffe 14
polmod_to_embed 84
polrootsbound 26985
polrootsbound_i 26978
polsolve 164790
quicktofp 4052119
realroots 50536
refine_F 478703
refine_H 2355215
root_error 1828520
roots 7913
roots_aux 220881
roots_com 220853
rootsdeg0 42
scalepol 4086480
scalepol2n 0
sol_ok 3399
solve_exact_pol 212597
split_0 471038
split_0_1 446060
split_0_2 446062
split_1 445740
split_2 470714
split_complete 1452723
split_fromU 470715
split_pols 164793
splitcauchy 164797
splitpoleval 5166529
tocomplex 1174105
update_radius 470713
usp 229459

Generated by: LCOV version 1.14