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

Generated by: LCOV version 1.16