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 30772-246cd0a587) Lines: 1467 1530 95.9 %
Date: 2026-03-28 09:27:57 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 296304
RgX_gtofp_bit 7048116
RgX_normalize1 35702
X2XP1 5990624
ZX_Uspensky 1313875
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15205
ZX_graeffe 5439
ZX_realroots_irred 48573
ZX_rescale2prim 2233797
ZX_sturm 6395
ZX_sturm_i 123068
ZX_sturm_irred 116673
ZX_sturmpart 1128281
ZX_to_ZiX 16490859
ZiX_sqr 99235234
_gen_nored 11211521
_gen_one 14473747
_gen_zero 326034
_intervalcmp 0
_mp_add 24667156
_mp_cmul 34786411
_mp_mul 4374706
_mp_sqr 6298785
_mp_sub 0
_sqrtnr 22598
a_posteriori_errors 537467
abs_update 8021467
abs_update_r 780137
all_roots 536362
append_clone 1616168
bkeval_single_power 5236452
check_ab 1178908
checkbound 2354948
checkvalidpol 267211
clean_roots 536409
cleanroots 231763
cmp_complex_appr 2241493
conformal_basecase 1406441
conformal_mapping 468773
conformal_pol 1406561
dblexp 6562544
dbllog2 304090566
dft 503315
dual_modulus 1014480
eval_rel_pol 13168327
fft 14194705
fft2 7462
findpower 41029912
fix_roots 537468
fix_roots1 398786
fujiwara_bound 2271971
fujiwara_bound_real 1406931
graeffe 49610164
homothetie 1613568
homothetie2n 9979129
homothetie_gauss 36565170
ind_maxlog2 904354
initdft 998237
isexactpol 240103
isexactscalar 934017
isreal 963698
isvalidcoeff 1230434
logmax_modulus 4458551
logmin_modulus 1617657
logmodulus 608222
logpre_modulus 608220
logradius 494920
lower_bound 41031008
mydbllog2i 226907546
mydbllog2r 57612787
mydbllogr 9565753
mygprec 63864546
mygprec_absolute 4344193
mygprec_special 537473
mygprecrc 215579245
mygprecrc_special 2181410
myshiftic 136160825
myshiftrc 35577281
newton_polygon 5520807
optimize_split 494924
parameters 494922
pol_to_gaussint 17627168
polgraeffe 14
polmod_to_embed 84
polrootsbound 27101
polrootsbound_i 27095
polsolve 166709
quicktofp 6981276
realroots 50627
refine_F 503314
refine_H 2464595
root_error 1914412
roots 8368
roots_aux 240131
roots_com 240103
rootsdeg0 42
scalepol 4297351
scalepol2n 0
sol_ok 3378
solve_exact_pol 231495
split_0 495294
split_0_1 469145
split_0_2 469145
split_1 468774
split_2 494923
split_complete 1528054
split_fromU 494924
split_pols 166704
splitcauchy 166712
splitpoleval 5236727
tocomplex 1215886
update_radius 494924
usp 1126076

Generated by: LCOV version 1.16