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 30256-57c6c2b57f) Lines: 1467 1530 95.9 %
Date: 2025-05-09 09:19:30 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 15211
_sqrtnr 22646
polrootsbound_i 27076
polrootsbound 27082
RgX_normalize1 35670
ZX_realroots_irred 48309
realroots 50613
ZX_sturm_irred 116300
ZX_sturm_i 120035
split_pols 165657
polsolve 165660
splitcauchy 165666
solve_exact_pol 231040
cleanroots 231644
isexactpol 239634
roots_com 239634
roots_aux 239662
checkvalidpol 266724
QX_complex_roots 289537
_gen_zero 323604
fix_roots1 393867
conformal_mapping 467722
split_1 467722
split_0_1 468044
split_0_2 468044
logradius 493537
update_radius 493540
parameters 493542
split_2 493542
optimize_split 493544
split_fromU 493544
split_0 493863
refine_F 501926
dft 501927
all_roots 529128
clean_roots 529171
a_posteriori_errors 530169
fix_roots 530170
mygprec_special 530177
logpre_modulus 606035
logmodulus 606038
abs_update_r 777872
ZX_sturmpart 876882
ind_maxlog2 901842
check_ab 927495
isexactscalar 931280
usp 936989
isreal 961265
initdft 995466
dual_modulus 1011588
ZX_Uspensky 1059441
fujiwara_bound_real 1149542
tocomplex 1199336
isvalidcoeff 1226882
conformal_basecase 1403279
conformal_pol 1403397
split_complete 1517899
append_clone 1601560
homothetie 1608504
logmin_modulus 1613974
checkbound 1852120
root_error 1896574
ZX_rescale2prim 1935700
fujiwara_bound 2005739
mygprecrc_special 2159090
cmp_complex_appr 2226144
refine_H 2458764
scalepol 4286870
mygprec_absolute 4294439
_mp_mul 4360650
logmax_modulus 4448060
bkeval_single_power 5195342
splitpoleval 5195508
X2XP1 5201511
newton_polygon 5500674
_mp_sqr 6273264
quicktofp 6445300
dblexp 6544395
RgX_gtofp_bit 7017124
abs_update 7998943
mydbllogr 9539666
homothetie2n 9948359
_gen_nored 11127788
eval_rel_pol 13125950
fft 14142973
_gen_one 14369241
ZX_to_ZiX 16450393
pol_to_gaussint 17573836
_mp_add 24578819
_mp_cmul 34609741
myshiftrc 35478053
homothetie_gauss 36474712
lower_bound 40929607
findpower 40930653
graeffe 49473844
mydbllog2r 56036814
mygprec 63634047
ZiX_sqr 98960447
myshiftic 135744132
mygprecrc 214788307
mydbllog2i 224228898
dbllog2 300288622

Generated by: LCOV version 1.16