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

Generated by: LCOV version 1.16