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 30842-de08e65e1b) Lines: 1467 1530 95.9 %
Date: 2026-04-29 09:26:11 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 15201
_sqrtnr 22594
polrootsbound_i 27230
polrootsbound 27237
RgX_normalize1 35838
ZX_realroots_irred 48570
realroots 50627
ZX_sturm_irred 116678
ZX_sturm_i 123073
split_pols 166689
polsolve 166697
splitcauchy 166712
solve_exact_pol 231509
cleanroots 231763
isexactpol 240117
roots_com 240117
roots_aux 240145
checkvalidpol 267361
QX_complex_roots 296323
_gen_zero 325993
fix_roots1 398818
conformal_mapping 468820
split_1 468823
split_0_1 469195
split_0_2 469196
split_2 494970
logradius 494972
parameters 494972
optimize_split 494973
split_fromU 494973
update_radius 494973
split_0 495343
refine_F 503365
dft 503373
all_roots 536396
clean_roots 536440
a_posteriori_errors 537495
fix_roots 537496
mygprec_special 537505
logmodulus 608286
logpre_modulus 608286
abs_update_r 780170
ind_maxlog2 904407
isexactscalar 934122
isreal 963795
initdft 998346
dual_modulus 1014567
usp 1126159
ZX_sturmpart 1128345
check_ab 1178972
tocomplex 1215997
isvalidcoeff 1231117
ZX_Uspensky 1313950
conformal_basecase 1406582
conformal_pol 1406700
fujiwara_bound_real 1407029
split_complete 1528179
homothetie 1613719
append_clone 1616287
logmin_modulus 1617856
root_error 1914528
mygprecrc_special 2181566
ZX_rescale2prim 2233901
cmp_complex_appr 2241623
fujiwara_bound 2274092
checkbound 2355073
refine_H 2464755
scalepol 4297745
mygprec_absolute 4344502
_mp_mul 4374454
logmax_modulus 4459165
bkeval_single_power 5234832
splitpoleval 5235060
newton_polygon 5521293
X2XP1 5990894
_mp_sqr 6298084
dblexp 6563162
quicktofp 6987930
RgX_gtofp_bit 7048752
abs_update 8021483
mydbllogr 9565998
homothetie2n 9980080
_gen_nored 11195500
eval_rel_pol 13169655
fft 14196154
_gen_one 14470169
ZX_to_ZiX 16495651
pol_to_gaussint 17628827
_mp_add 24660119
_mp_cmul 34751901
myshiftrc 35581247
homothetie_gauss 36566365
lower_bound 41032550
findpower 41032635
graeffe 49606741
mydbllog2r 57624536
mygprec 63866108
ZiX_sqr 99235827
myshiftic 136093263
mygprecrc 215586578
mydbllog2i 226795949
dbllog2 303949899

Generated by: LCOV version 1.16