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

Generated by: LCOV version 1.16