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 30762-238ab8e6c0) Lines: 1467 1530 95.9 %
Date: 2026-03-22 09:27:12 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 296305
RgX_gtofp_bit 7048058
RgX_normalize1 35705
X2XP1 5990911
ZX_Uspensky 1313936
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15203
ZX_graeffe 5439
ZX_realroots_irred 48572
ZX_rescale2prim 2233921
ZX_sturm 6395
ZX_sturm_i 123070
ZX_sturm_irred 116674
ZX_sturmpart 1128337
ZX_to_ZiX 16491180
ZiX_sqr 99237805
_gen_nored 11209675
_gen_one 14475847
_gen_zero 326019
_intervalcmp 0
_mp_add 24664938
_mp_cmul 34781735
_mp_mul 4374608
_mp_sqr 6298690
_mp_sub 0
_sqrtnr 22596
a_posteriori_errors 537473
abs_update 8021401
abs_update_r 780135
all_roots 536367
append_clone 1616175
bkeval_single_power 5236319
check_ab 1178963
checkbound 2355055
checkvalidpol 267214
clean_roots 536415
cleanroots 231763
cmp_complex_appr 2241491
conformal_basecase 1406454
conformal_mapping 468780
conformal_pol 1406574
dblexp 6562620
dbllog2 304084251
dft 503326
dual_modulus 1014496
eval_rel_pol 13168667
fft 14194799
fft2 7462
findpower 41031785
fix_roots 537472
fix_roots1 398791
fujiwara_bound 2272044
fujiwara_bound_real 1407008
graeffe 49610318
homothetie 1613580
homothetie2n 9979150
homothetie_gauss 36564984
ind_maxlog2 904366
initdft 998254
isexactpol 240103
isexactscalar 934017
isreal 963712
isvalidcoeff 1230445
logmax_modulus 4458658
logmin_modulus 1617693
logmodulus 608220
logpre_modulus 608221
logradius 494922
lower_bound 41031487
mydbllog2i 226897174
mydbllog2r 57613315
mydbllogr 9565781
mygprec 63864905
mygprec_absolute 4344235
mygprec_special 537475
mygprecrc 215576005
mygprecrc_special 2181408
myshiftic 136143931
myshiftrc 35577214
newton_polygon 5520785
optimize_split 494932
parameters 494930
pol_to_gaussint 17627300
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166700
quicktofp 6981493
realroots 50627
refine_F 503324
refine_H 2464577
root_error 1914411
roots 8368
roots_aux 240131
roots_com 240103
rootsdeg0 42
scalepol 4297388
scalepol2n 0
sol_ok 3378
solve_exact_pol 231495
split_0 495303
split_0_1 469150
split_0_2 469152
split_1 468780
split_2 494929
split_complete 1528063
split_fromU 494932
split_pols 166695
splitcauchy 166709
splitpoleval 5236454
tocomplex 1215876
update_radius 494932
usp 1126132

Generated by: LCOV version 1.16