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 30735-65f72320ad) Lines: 1468 1530 95.9 %
Date: 2026-03-10 09:24:00 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 296310
RgX_gtofp_bit 7035399
RgX_normalize1 35705
X2XP1 5990796
ZX_Uspensky 1313936
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15205
ZX_graeffe 5439
ZX_realroots_irred 48575
ZX_rescale2prim 2233893
ZX_sturm 6395
ZX_sturm_i 123071
ZX_sturm_irred 116676
ZX_sturmpart 1128335
ZX_to_ZiX 16451956
ZiX_sqr 99069169
_gen_nored 11205960
_gen_one 14474710
_gen_zero 326021
_intervalcmp 0
_mp_add 24665069
_mp_cmul 34774017
_mp_mul 4374657
_mp_sqr 6298600
_mp_sub 0
_sqrtnr 22598
a_posteriori_errors 537121
abs_update 8008642
abs_update_r 779104
all_roots 536019
append_clone 1614341
bkeval_single_power 5235744
check_ab 1178962
checkbound 2355054
checkvalidpol 266864
clean_roots 536066
cleanroots 231763
cmp_complex_appr 2238493
conformal_basecase 1404270
conformal_mapping 468053
conformal_pol 1404388
dblexp 6551676
dbllog2 302188742
dft 502537
dual_modulus 1012838
eval_rel_pol 13144971
fft 14165500
fft2 7462
findpower 40966112
fix_roots 537117
fix_roots1 398482
fujiwara_bound 2271690
fujiwara_bound_real 1406999
graeffe 49528269
homothetie 1610812
homothetie2n 9962059
homothetie_gauss 36505537
ind_maxlog2 903061
initdft 996686
isexactpol 239753
isexactscalar 931714
isreal 962202
isvalidcoeff 1228065
logmax_modulus 4451820
logmin_modulus 1615179
logmodulus 607100
logpre_modulus 607099
logradius 494145
lower_bound 40964764
mydbllog2i 226488759
mydbllog2r 56189461
mydbllogr 9550447
mygprec 63776416
mygprec_absolute 4339636
mygprec_special 537125
mygprecrc 215231784
mygprecrc_special 2179238
myshiftic 135901937
myshiftrc 35519481
newton_polygon 5510550
optimize_split 494150
parameters 494150
pol_to_gaussint 17596677
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166704
quicktofp 6979504
realroots 50627
refine_F 502531
refine_H 2461231
root_error 1912465
roots 8018
roots_aux 239781
roots_com 239753
rootsdeg0 42
scalepol 4290697
scalepol2n 0
sol_ok 3378
solve_exact_pol 231145
split_0 494514
split_0_1 468414
split_0_2 468415
split_1 468053
split_2 494148
split_complete 1526151
split_fromU 494149
split_pols 166700
splitcauchy 166707
splitpoleval 5236364
tocomplex 1213836
update_radius 494149
usp 1126135

Generated by: LCOV version 1.16