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) Coverage Total Hit
Test: PARI/GP v2.19.0 lcov report (development 31092-e6893b0017) Lines: 94.1 % 1561 1469
Test Date: 2026-11-21 17:03:01 Functions: 96.7 % 121 117
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
_intervalcmp 0
_mp_sub 0
polgraeffe 0
scalepol2n 0
RgX_Graeffe 14
ZX_Uspensky_equal_yes 14
polgraeffe0 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 5460
ZX_sturm 6395
fft2 7462
roots 8382
ZX_deg1root 15273
_sqrtnr 22876
polrootsbound_i 27800
polrootsbound 27807
RgX_normalize1 36408
ZX_realroots_irred 48667
realroots 50631
ZX_sturm_irred 117167
ZX_sturm_i 123562
polsolve 166988
split_pols 166988
splitcauchy 166988
solve_exact_pol 231621
cleanroots 231875
isexactpol 240229
roots_com 240229
roots_aux 240257
checkvalidpol 268043
QX_complex_roots 297216
_gen_zero 326083
fix_roots1 398955
conformal_mapping 469140
split_1 469140
split_0_1 469512
split_0_2 469512
logradius 495273
optimize_split 495273
parameters 495273
split_2 495273
split_fromU 495273
update_radius 495273
split_0 495645
dft 503714
refine_F 503714
all_roots 537403
clean_roots 537445
a_posteriori_errors 538504
fix_roots 538504
mygprec_special 538504
logmodulus 608838
logpre_modulus 608838
abs_update_r 781178
ind_maxlog2 904870
isexactscalar 934563
isreal 964413
initdft 998987
dual_modulus 1015248
usp 1127936
ZX_sturmpart 1128977
check_ab 1179608
tocomplex 1219419
isvalidcoeff 1235245
ZX_Uspensky 1315077
conformal_basecase 1407539
conformal_pol 1407658
fujiwara_bound_real 1408185
split_complete 1529794
homothetie 1614955
logmin_modulus 1618153
append_clone 1618831
root_error 1919303
mygprecrc_special 2185105
ZX_rescale2prim 2237918
cmp_complex_appr 2249855
fujiwara_bound 2276698
checkbound 2356346
refine_H 2466375
scalepol 4300659
mygprec_absolute 4356226
_mp_mul 4430508
logmax_modulus 4461166
bkeval_single_power 5250345
splitpoleval 5250345
newton_polygon 5526769
X2XP1 6001560
_mp_sqr 6349855
dblexp 6569467
quicktofp 7000037
RgX_gtofp_bit 7056207
abs_update 8028220
mydbllogr 9573915
homothetie2n 9987935
_gen_nored 11267932
eval_rel_pol 13181638
fft 14225763
_gen_one 14524606
ZX_to_ZiX 16454887
pol_to_gaussint 17642804
_mp_add 24942089
_mp_cmul 35116696
myshiftrc 35616567
homothetie_gauss 36603079
findpower 41064245
lower_bound 41064245
graeffe 49674339
mydbllog2r 58107976
mygprec 63982105
ZiX_sqr 99348678
myshiftic 136512514
mygprecrc 215741391
mydbllog2i 227083066
dbllog2 304773781

Generated by: LCOV version 2.0-1