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 30007-407ab607e8) Lines: 1467 1530 95.9 %
Date: 2025-02-20 09:19:49 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 3740
ZX_graeffe 5383
fft2 7462
roots 8018
ZX_deg1root 15324
_sqrtnr 22761
polrootsbound_i 27261
polrootsbound 27268
RgX_normalize1 35855
ZX_realroots_irred 48430
realroots 50613
ZX_sturm_irred 116503
ZX_sturm_i 120243
split_pols 165677
polsolve 165679
splitcauchy 165683
solve_exact_pol 231040
cleanroots 231644
isexactpol 239634
roots_com 239634
roots_aux 239662
checkvalidpol 266909
QX_complex_roots 289871
_gen_zero 323462
fix_roots1 394024
conformal_mapping 467896
split_1 467897
split_0_1 468216
split_0_2 468216
logradius 493720
parameters 493720
update_radius 493720
split_2 493721
optimize_split 493722
split_fromU 493722
split_0 494043
refine_F 502061
dft 502066
all_roots 529459
clean_roots 529509
fix_roots 530504
a_posteriori_errors 530507
mygprec_special 530510
logpre_modulus 606104
logmodulus 606106
abs_update_r 778113
ZX_sturmpart 879092
ind_maxlog2 902524
check_ab 929705
isexactscalar 931280
usp 940340
isreal 961619
initdft 995788
dual_modulus 1011927
ZX_Uspensky 1061770
fujiwara_bound_real 1151963
tocomplex 1200141
isvalidcoeff 1227605
conformal_basecase 1403803
conformal_pol 1403922
split_complete 1518587
append_clone 1602246
homothetie 1608908
logmin_modulus 1614746
checkbound 1856540
root_error 1897645
ZX_rescale2prim 1937694
fujiwara_bound 2008843
mygprecrc_special 2160116
cmp_complex_appr 2227063
refine_H 2459619
scalepol 4288435
mygprec_absolute 4297141
_mp_mul 4360488
logmax_modulus 4450385
splitpoleval 5195719
bkeval_single_power 5195845
X2XP1 5208803
newton_polygon 5500803
_mp_sqr 6273817
quicktofp 6453410
dblexp 6546473
RgX_gtofp_bit 7017805
abs_update 7999303
mydbllogr 9540428
homothetie2n 9950848
_gen_nored 11120605
eval_rel_pol 13128487
fft 14138324
_gen_one 14371768
ZX_to_ZiX 16456959
pol_to_gaussint 17578830
_mp_add 24575959
_mp_cmul 34596390
myshiftrc 35493533
homothetie_gauss 36495869
lower_bound 40954174
findpower 40954800
graeffe 49497112
mydbllog2r 55901515
mygprec 63653531
ZiX_sqr 99018576
myshiftic 135799940
mygprecrc 214817268
mydbllog2i 224331909
dbllog2 300254714

Generated by: LCOV version 1.16