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 30622-caa25a75db) Lines: 1467 1530 95.9 %
Date: 2026-01-22 09:18:00 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 5254
ZX_sturm 6379
fft2 7462
roots 8018
ZX_deg1root 14229
_sqrtnr 21223
polrootsbound_i 25774
polrootsbound 25781
RgX_normalize1 34382
ZX_realroots_irred 45109
realroots 50627
ZX_sturm_irred 107655
ZX_sturm_i 114034
split_pols 159413
splitcauchy 159414
polsolve 159416
solve_exact_pol 231145
cleanroots 231763
isexactpol 239753
roots_com 239753
roots_aux 239781
checkvalidpol 265541
QX_complex_roots 272842
_gen_zero 303455
fix_roots1 385385
split_1 449087
conformal_mapping 449089
split_0_1 449454
split_0_2 449454
logradius 473802
optimize_split 473802
parameters 473802
split_2 473802
split_fromU 473802
update_radius 473802
split_0 474167
dft 481796
refine_F 481797
all_roots 512550
clean_roots 512597
a_posteriori_errors 513653
fix_roots 513653
mygprec_special 513656
logmodulus 579298
logpre_modulus 579299
abs_update_r 753868
ind_maxlog2 867544
isreal 922889
isexactscalar 931714
initdft 955598
dual_modulus 970676
usp 1095397
ZX_sturmpart 1105875
tocomplex 1135151
check_ab 1156502
isvalidcoeff 1215544
ZX_Uspensky 1281083
conformal_basecase 1347385
conformal_pol 1347504
fujiwara_bound_real 1365253
split_complete 1461984
homothetie 1541158
append_clone 1542069
logmin_modulus 1543917
root_error 1817619
mygprecrc_special 2083497
cmp_complex_appr 2114006
fujiwara_bound 2188657
ZX_rescale2prim 2195207
checkbound 2310146
refine_H 2365886
mygprec_absolute 4085363
scalepol 4115931
logmax_modulus 4257760
_mp_mul 4305337
bkeval_single_power 5016186
splitpoleval 5016194
newton_polygon 5255914
X2XP1 5882183
_mp_sqr 6139397
dblexp 6266179
RgX_gtofp_bit 6706057
quicktofp 6711105
abs_update 7589700
mydbllogr 9065263
homothetie2n 9513652
_gen_nored 10785265
eval_rel_pol 12548993
fft 13422554
_gen_one 13908117
ZX_to_ZiX 15256148
pol_to_gaussint 16806742
_mp_add 24211540
myshiftrc 33802732
_mp_cmul 33929710
homothetie_gauss 34921685
findpower 39179885
lower_bound 39179901
graeffe 47366046
mydbllog2r 54270538
mygprec 61071836
ZiX_sqr 94733827
myshiftic 129443337
mygprecrc 203725883
mydbllog2i 215169087
dbllog2 287307101

Generated by: LCOV version 1.16