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

Generated by: LCOV version 1.16