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 30802-b11b770002) Lines: 1467 1530 95.9 %
Date: 2026-04-12 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 22597
polrootsbound_i 27097
polrootsbound 27104
RgX_normalize1 35705
ZX_realroots_irred 48576
realroots 50627
ZX_sturm_irred 116674
ZX_sturm_i 123069
split_pols 166702
polsolve 166703
splitcauchy 166716
solve_exact_pol 231495
cleanroots 231763
isexactpol 240103
roots_com 240103
roots_aux 240131
checkvalidpol 267214
QX_complex_roots 296313
_gen_zero 325982
fix_roots1 398797
conformal_mapping 468787
split_1 468787
split_0_1 469154
split_0_2 469154
update_radius 494934
logradius 494935
optimize_split 494935
split_2 494936
split_fromU 494936
parameters 494937
split_0 495305
refine_F 503324
dft 503330
all_roots 536373
clean_roots 536416
a_posteriori_errors 537476
mygprec_special 537478
fix_roots 537479
logpre_modulus 608233
logmodulus 608235
abs_update_r 780142
ind_maxlog2 904369
isexactscalar 934017
isreal 963722
initdft 998266
dual_modulus 1014497
usp 1126211
ZX_sturmpart 1128391
check_ab 1179018
tocomplex 1215888
isvalidcoeff 1230445
ZX_Uspensky 1313993
conformal_basecase 1406477
conformal_pol 1406597
fujiwara_bound_real 1407065
split_complete 1528081
homothetie 1613595
append_clone 1616196
logmin_modulus 1617733
root_error 1914418
mygprecrc_special 2181439
ZX_rescale2prim 2234064
cmp_complex_appr 2241519
fujiwara_bound 2272120
checkbound 2355166
refine_H 2464637
scalepol 4297400
mygprec_absolute 4344157
_mp_mul 4374498
logmax_modulus 4458664
splitpoleval 5235409
bkeval_single_power 5235430
newton_polygon 5520904
X2XP1 5991235
_mp_sqr 6298343
dblexp 6562638
quicktofp 6981730
RgX_gtofp_bit 7048277
abs_update 8020756
mydbllogr 9565366
homothetie2n 9979197
_gen_nored 11197055
eval_rel_pol 13168812
fft 14194693
_gen_one 14471801
ZX_to_ZiX 16490509
pol_to_gaussint 17627537
_mp_add 24660822
_mp_cmul 34756795
myshiftrc 35577993
homothetie_gauss 36561346
lower_bound 41030077
findpower 41030766
graeffe 49602043
mydbllog2r 57612181
mygprec 63861742
ZiX_sqr 99224812
myshiftic 136064170
mygprecrc 215569028
mydbllog2i 226850852
dbllog2 303996607

Generated by: LCOV version 1.16