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 30146-7dee4152cd) Lines: 1467 1530 95.9 %
Date: 2025-04-19 09:18:32 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 289485
RgX_gtofp_bit 7017121
RgX_normalize1 35628
X2XP1 5201026
ZX_Uspensky 1059366
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15211
ZX_graeffe 5383
ZX_realroots_irred 48309
ZX_rescale2prim 1935499
ZX_sturm 3735
ZX_sturm_i 120015
ZX_sturm_irred 116280
ZX_sturmpart 876823
ZX_to_ZiX 16455150
ZiX_sqr 98964472
_gen_nored 11121162
_gen_one 14368863
_gen_zero 323616
_intervalcmp 0
_mp_add 24575751
_mp_cmul 34599563
_mp_mul 4360564
_mp_sqr 6273215
_mp_sub 0
_sqrtnr 22645
a_posteriori_errors 530122
abs_update 7999367
abs_update_r 777843
all_roots 529068
append_clone 1601480
bkeval_single_power 5194991
check_ab 927436
checkbound 1852002
checkvalidpol 266682
clean_roots 529122
cleanroots 231644
cmp_complex_appr 2226049
conformal_basecase 1403336
conformal_mapping 467740
conformal_pol 1403454
dblexp 6544497
dbllog2 300174311
dft 501933
dual_modulus 1011600
eval_rel_pol 13126117
fft 14143372
fft2 7462
findpower 40931973
fix_roots 530121
fix_roots1 393853
fujiwara_bound 2005581
fujiwara_bound_real 1149462
graeffe 49473382
homothetie 1608540
homothetie2n 9948419
homothetie_gauss 36476177
ind_maxlog2 901859
initdft 995479
isexactpol 239634
isexactscalar 931280
isreal 961283
isvalidcoeff 1226651
logmax_modulus 4448198
logmin_modulus 1614058
logmodulus 606031
logpre_modulus 606027
logradius 493538
lower_bound 40931242
mydbllog2i 224228103
mydbllog2r 55920542
mydbllogr 9540254
mygprec 63632986
mygprec_absolute 4294085
mygprec_special 530127
mygprecrc 214799779
mygprecrc_special 2158970
myshiftic 135726963
myshiftrc 35478158
newton_polygon 5500643
optimize_split 493547
parameters 493546
pol_to_gaussint 17574322
polgraeffe 14
polmod_to_embed 84
polrootsbound 27041
polrootsbound_i 27034
polsolve 165662
quicktofp 6444867
realroots 50613
refine_F 501930
refine_H 2458806
root_error 1896457
roots 8018
roots_aux 239662
roots_com 239634
rootsdeg0 42
scalepol 4286984
scalepol2n 0
sol_ok 3350
solve_exact_pol 231040
split_0 493870
split_0_1 468064
split_0_2 468064
split_1 467739
split_2 493544
split_complete 1517842
split_fromU 493547
split_pols 165663
splitcauchy 165666
splitpoleval 5194823
tocomplex 1199217
update_radius 493541
usp 936884

Generated by: LCOV version 1.16