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 30848-b1463d63da) Lines: 1467 1530 95.9 %
Date: 2026-04-30 09:27: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 5439
ZX_sturm 6395
fft2 7462
roots 8382
ZX_deg1root 15203
_sqrtnr 22596
polrootsbound_i 27230
polrootsbound 27237
RgX_normalize1 35838
ZX_realroots_irred 48568
realroots 50627
ZX_sturm_irred 116679
ZX_sturm_i 123074
polsolve 166699
split_pols 166702
splitcauchy 166709
solve_exact_pol 231509
cleanroots 231763
isexactpol 240117
roots_com 240117
roots_aux 240145
checkvalidpol 267361
QX_complex_roots 296315
_gen_zero 326004
fix_roots1 398816
conformal_mapping 468815
split_1 468816
split_0_1 469186
split_0_2 469187
logradius 494957
update_radius 494962
split_2 494963
parameters 494964
optimize_split 494965
split_fromU 494965
split_0 495332
refine_F 503356
dft 503363
all_roots 536390
clean_roots 536437
a_posteriori_errors 537494
fix_roots 537500
mygprec_special 537500
logmodulus 608278
logpre_modulus 608279
abs_update_r 780171
ind_maxlog2 904394
isexactscalar 934122
isreal 963781
initdft 998325
dual_modulus 1014555
usp 1126022
ZX_sturmpart 1128242
check_ab 1178869
tocomplex 1215985
isvalidcoeff 1231117
ZX_Uspensky 1313846
conformal_basecase 1406562
conformal_pol 1406682
fujiwara_bound_real 1406918
split_complete 1528162
homothetie 1613702
append_clone 1616268
logmin_modulus 1617791
root_error 1914525
mygprecrc_special 2181546
ZX_rescale2prim 2233818
cmp_complex_appr 2241636
fujiwara_bound 2273961
checkbound 2354870
refine_H 2464708
scalepol 4297695
mygprec_absolute 4344466
_mp_mul 4374424
logmax_modulus 4459041
splitpoleval 5235313
bkeval_single_power 5235490
newton_polygon 5521266
X2XP1 5990616
_mp_sqr 6298398
dblexp 6563078
quicktofp 6987518
RgX_gtofp_bit 7048732
abs_update 8021961
mydbllogr 9566363
homothetie2n 9979989
_gen_nored 11198556
eval_rel_pol 13169636
fft 14196351
_gen_one 14472472
ZX_to_ZiX 16495291
pol_to_gaussint 17628671
_mp_add 24660529
_mp_cmul 34759984
myshiftrc 35580029
homothetie_gauss 36569333
lower_bound 41033766
findpower 41033942
graeffe 49610792
mydbllog2r 57622882
mygprec 63865823
ZiX_sqr 99240332
myshiftic 136091084
mygprecrc 215585728
mydbllog2i 226812944
dbllog2 303964166

Generated by: LCOV version 1.16