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 30072-2ccdc2326c) Lines: 1467 1530 95.9 %
Date: 2025-03-12 09:19:58 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 289848
RgX_gtofp_bit 7018755
RgX_normalize1 35873
X2XP1 5201779
ZX_Uspensky 1059536
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15308
ZX_graeffe 5383
ZX_realroots_irred 48412
ZX_rescale2prim 1935757
ZX_sturm 3735
ZX_sturm_i 120239
ZX_sturm_irred 116504
ZX_sturmpart 876852
ZX_to_ZiX 16458643
ZiX_sqr 99003023
_gen_nored 11121318
_gen_one 14371802
_gen_zero 323550
_intervalcmp 0
_mp_add 24575684
_mp_cmul 34598984
_mp_mul 4360415
_mp_sqr 6273832
_mp_sub 0
_sqrtnr 22757
a_posteriori_errors 530487
abs_update 8000799
abs_update_r 778000
all_roots 529441
append_clone 1602225
bkeval_single_power 5196074
check_ab 927465
checkbound 1852060
checkvalidpol 266927
clean_roots 529486
cleanroots 231644
cmp_complex_appr 2226977
conformal_basecase 1403609
conformal_mapping 467829
conformal_pol 1403729
dblexp 6545670
dbllog2 300228399
dft 502025
dual_modulus 1011802
eval_rel_pol 13128812
fft 14145173
fft2 7462
findpower 40945204
fix_roots 530486
fix_roots1 394022
fujiwara_bound 2006561
fujiwara_bound_real 1149726
graeffe 49490276
homothetie 1608862
homothetie2n 9950742
homothetie_gauss 36491416
ind_maxlog2 902079
initdft 995661
isexactpol 239634
isexactscalar 931280
isreal 961470
isvalidcoeff 1227645
logmax_modulus 4449327
logmin_modulus 1614381
logmodulus 606145
logpre_modulus 606139
logradius 493636
lower_bound 40943316
mydbllog2i 224282988
mydbllog2r 55929688
mydbllogr 9541814
mygprec 63646941
mygprec_absolute 4296717
mygprec_special 530491
mygprecrc 214854534
mygprecrc_special 2160084
myshiftic 135775079
myshiftrc 35485214
newton_polygon 5501773
optimize_split 493639
parameters 493638
pol_to_gaussint 17578091
polgraeffe 14
polmod_to_embed 84
polrootsbound 27286
polrootsbound_i 27279
polsolve 165678
quicktofp 6447529
realroots 50613
refine_F 502018
refine_H 2459120
root_error 1897505
roots 8018
roots_aux 239662
roots_com 239634
rootsdeg0 42
scalepol 4287796
scalepol2n 0
sol_ok 3350
solve_exact_pol 231040
split_0 493961
split_0_1 468149
split_0_2 468147
split_1 467831
split_2 493636
split_complete 1518404
split_fromU 493639
split_pols 165673
splitcauchy 165684
splitpoleval 5195694
tocomplex 1199992
update_radius 493637
usp 937101

Generated by: LCOV version 1.16