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

Generated by: LCOV version 1.16