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 30861-40e9da58f9) Lines: 1467 1530 95.9 %
Date: 2026-05-04 09:27:01 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 5439
ZX_sturm 6395
fft2 7462
roots 8382
ZX_deg1root 15273
_sqrtnr 22667
polrootsbound_i 27230
polrootsbound 27237
RgX_normalize1 35838
ZX_realroots_irred 48651
realroots 50627
ZX_sturm_irred 116713
ZX_sturm_i 123108
split_pols 166735
polsolve 166741
splitcauchy 166749
solve_exact_pol 231509
cleanroots 231763
isexactpol 240117
roots_com 240117
roots_aux 240145
checkvalidpol 267361
QX_complex_roots 296332
_gen_zero 326021
fix_roots1 398828
conformal_mapping 468819
split_1 468820
split_0_1 469189
split_0_2 469190
split_2 494966
parameters 494971
update_radius 494971
logradius 494972
optimize_split 494972
split_fromU 494972
split_0 495337
refine_F 503367
dft 503371
all_roots 536403
clean_roots 536454
a_posteriori_errors 537508
fix_roots 537514
mygprec_special 537517
logpre_modulus 608287
logmodulus 608289
abs_update_r 780220
ind_maxlog2 904424
isexactscalar 934122
isreal 963792
initdft 998342
dual_modulus 1014574
usp 1126141
ZX_sturmpart 1128275
check_ab 1178902
tocomplex 1216032
isvalidcoeff 1231117
ZX_Uspensky 1313903
conformal_basecase 1406578
conformal_pol 1406698
fujiwara_bound_real 1407009
split_complete 1528186
homothetie 1613724
append_clone 1616311
logmin_modulus 1617798
root_error 1914578
mygprecrc_special 2181607
ZX_rescale2prim 2233869
cmp_complex_appr 2241717
fujiwara_bound 2274167
checkbound 2354932
refine_H 2464753
scalepol 4297738
mygprec_absolute 4344587
_mp_mul 4375575
logmax_modulus 4459012
splitpoleval 5236256
bkeval_single_power 5236544
newton_polygon 5521427
X2XP1 5990774
_mp_sqr 6299654
dblexp 6563165
quicktofp 6988095
RgX_gtofp_bit 7048922
abs_update 8021435
mydbllogr 9566202
homothetie2n 9980001
_gen_nored 11202041
eval_rel_pol 13169885
fft 14196339
_gen_one 14475753
ZX_to_ZiX 16492306
pol_to_gaussint 17628847
_mp_add 24663807
_mp_cmul 34767314
myshiftrc 35580295
homothetie_gauss 36565402
lower_bound 41032919
findpower 41033470
graeffe 49605176
mydbllog2r 57630714
mygprec 63867068
ZiX_sqr 99236494
myshiftic 136079670
mygprecrc 215580025
mydbllog2i 226780802
dbllog2 303930934

Generated by: LCOV version 1.16