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 30775-9d8a55740a) Lines: 1467 1530 95.9 %
Date: 2026-04-05 09:26:48 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 8368
ZX_deg1root 15205
_sqrtnr 22596
polrootsbound_i 27097
polrootsbound 27104
RgX_normalize1 35705
ZX_realroots_irred 48576
realroots 50627
ZX_sturm_irred 116676
ZX_sturm_i 123071
polsolve 166709
split_pols 166710
splitcauchy 166716
solve_exact_pol 231495
cleanroots 231763
isexactpol 240103
roots_com 240103
roots_aux 240131
checkvalidpol 267214
QX_complex_roots 296307
_gen_zero 326005
fix_roots1 398788
split_1 468771
conformal_mapping 468773
split_0_1 469138
split_0_2 469138
logradius 494920
split_2 494921
split_fromU 494922
optimize_split 494924
parameters 494925
update_radius 494925
split_0 495296
refine_F 503312
dft 503317
all_roots 536365
clean_roots 536411
fix_roots 537465
a_posteriori_errors 537473
mygprec_special 537473
logmodulus 608222
logpre_modulus 608223
abs_update_r 780137
ind_maxlog2 904339
isexactscalar 934017
isreal 963693
initdft 998243
dual_modulus 1014474
usp 1126119
ZX_sturmpart 1128296
check_ab 1178923
tocomplex 1215873
isvalidcoeff 1230445
ZX_Uspensky 1313895
conformal_basecase 1406436
conformal_pol 1406556
fujiwara_bound_real 1406975
split_complete 1528059
homothetie 1613552
append_clone 1616169
logmin_modulus 1617662
root_error 1914398
mygprecrc_special 2181418
ZX_rescale2prim 2234001
cmp_complex_appr 2241490
fujiwara_bound 2272013
checkbound 2354975
refine_H 2464535
scalepol 4297313
mygprec_absolute 4344153
_mp_mul 4374492
logmax_modulus 4458528
splitpoleval 5235347
bkeval_single_power 5235510
newton_polygon 5520757
X2XP1 5991017
_mp_sqr 6298400
dblexp 6562429
quicktofp 6981449
RgX_gtofp_bit 7048049
abs_update 8020535
mydbllogr 9565143
homothetie2n 9978880
_gen_nored 11202487
eval_rel_pol 13168212
fft 14194059
_gen_one 14472069
ZX_to_ZiX 16487253
pol_to_gaussint 17626638
_mp_add 24662788
_mp_cmul 34766257
myshiftrc 35576449
homothetie_gauss 36561304
lower_bound 41026842
findpower 41027185
graeffe 49596975
mydbllog2r 57610858
mygprec 63860169
ZiX_sqr 99214686
myshiftic 136069368
mygprecrc 215545629
mydbllog2i 226840330
dbllog2 303977660

Generated by: LCOV version 1.16