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 30773-2078653b96) Lines: 1467 1530 95.9 %
Date: 2026-04-02 09:26:53 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 296308
RgX_gtofp_bit 7048117
RgX_normalize1 35705
X2XP1 5991312
ZX_Uspensky 1313953
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15199
ZX_graeffe 5439
ZX_realroots_irred 48570
ZX_rescale2prim 2234126
ZX_sturm 6395
ZX_sturm_i 123067
ZX_sturm_irred 116671
ZX_sturmpart 1128353
ZX_to_ZiX 16493046
ZiX_sqr 99234229
_gen_nored 11203340
_gen_one 14472971
_gen_zero 326016
_intervalcmp 0
_mp_add 24661231
_mp_cmul 34766292
_mp_mul 4374409
_mp_sqr 6298558
_mp_sub 0
_sqrtnr 22593
a_posteriori_errors 537468
abs_update 8020890
abs_update_r 780126
all_roots 536368
append_clone 1616165
bkeval_single_power 5235773
check_ab 1178980
checkbound 2355091
checkvalidpol 267214
clean_roots 536412
cleanroots 231763
cmp_complex_appr 2241481
conformal_basecase 1406486
conformal_mapping 468788
conformal_pol 1406606
dblexp 6562637
dbllog2 304032845
dft 503328
dual_modulus 1014482
eval_rel_pol 13168559
fft 14194213
fft2 7462
findpower 41031606
fix_roots 537472
fix_roots1 398790
fujiwara_bound 2272068
fujiwara_bound_real 1407028
graeffe 49607467
homothetie 1613574
homothetie2n 9979198
homothetie_gauss 36566385
ind_maxlog2 904355
initdft 998266
isexactpol 240103
isexactscalar 934017
isreal 963728
isvalidcoeff 1230445
logmax_modulus 4458758
logmin_modulus 1617741
logmodulus 608226
logpre_modulus 608222
logradius 494932
lower_bound 41031557
mydbllog2i 226882609
mydbllog2r 57614618
mydbllogr 9565137
mygprec 63863776
mygprec_absolute 4344219
mygprec_special 537476
mygprecrc 215581903
mygprecrc_special 2181415
myshiftic 136094917
myshiftrc 35578448
newton_polygon 5520805
optimize_split 494937
parameters 494936
pol_to_gaussint 17627359
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166708
quicktofp 6981638
realroots 50627
refine_F 503325
refine_H 2464629
root_error 1914414
roots 8368
roots_aux 240131
roots_com 240103
rootsdeg0 42
scalepol 4297444
scalepol2n 0
sol_ok 3378
solve_exact_pol 231495
split_0 495309
split_0_1 469160
split_0_2 469161
split_1 468791
split_2 494934
split_complete 1528085
split_fromU 494937
split_pols 166705
splitcauchy 166713
splitpoleval 5235584
tocomplex 1215880
update_radius 494936
usp 1126201

Generated by: LCOV version 1.16