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 30535-d1c72762fc) Lines: 1467 1530 95.9 %
Date: 2025-10-30 09:21:33 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 3378
ZX_graeffe 5390
ZX_sturm 6395
fft2 7462
roots 8018
ZX_deg1root 15275
_sqrtnr 22710
polrootsbound_i 27293
polrootsbound 27300
RgX_normalize1 35901
ZX_realroots_irred 48651
realroots 50627
ZX_sturm_irred 116776
ZX_sturm_i 123171
polsolve 166719
split_pols 166721
splitcauchy 166724
solve_exact_pol 231145
cleanroots 231763
isexactpol 239753
roots_com 239753
roots_aux 239781
checkvalidpol 267060
QX_complex_roots 296413
_gen_zero 326140
fix_roots1 398463
conformal_mapping 467918
split_1 467919
split_0_1 468276
split_0_2 468277
logradius 493963
update_radius 493965
split_2 493967
optimize_split 493969
parameters 493969
split_fromU 493970
split_0 494330
refine_F 502354
dft 502360
all_roots 536116
clean_roots 536164
fix_roots 537221
a_posteriori_errors 537222
mygprec_special 537224
logpre_modulus 606743
logmodulus 606744
abs_update_r 778672
ind_maxlog2 902672
isexactscalar 931714
isreal 961884
initdft 996328
dual_modulus 1012456
usp 1126051
ZX_sturmpart 1128261
check_ab 1178888
tocomplex 1213947
isvalidcoeff 1230235
ZX_Uspensky 1313899
conformal_basecase 1403862
conformal_pol 1403980
fujiwara_bound_real 1406921
split_complete 1525876
homothetie 1610083
append_clone 1614166
logmin_modulus 1614736
root_error 1912569
mygprecrc_special 2179166
ZX_rescale2prim 2233872
cmp_complex_appr 2238517
fujiwara_bound 2271789
checkbound 2354906
refine_H 2460430
scalepol 4289308
mygprec_absolute 4339856
_mp_mul 4374488
logmax_modulus 4450784
splitpoleval 5235505
bkeval_single_power 5235552
newton_polygon 5507110
X2XP1 5990582
_mp_sqr 6298218
dblexp 6548956
quicktofp 6979007
RgX_gtofp_bit 7031487
abs_update 8005511
mydbllogr 9546950
homothetie2n 9957423
_gen_nored 11200724
eval_rel_pol 13138077
fft 14159075
_gen_one 14472011
ZX_to_ZiX 16454972
pol_to_gaussint 17588815
_mp_add 24660974
_mp_cmul 34763543
myshiftrc 35505479
homothetie_gauss 36496523
lower_bound 40954394
findpower 40955049
graeffe 49504720
mydbllog2r 56171688
mygprec 63756618
ZiX_sqr 99024605
myshiftic 135796314
mygprecrc 215178147
mydbllog2i 226428064
dbllog2 302081621

Generated by: LCOV version 1.16