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 30813-28f64e5615) Lines: 1467 1530 95.9 %
Date: 2026-04-14 09:26: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 296310
RgX_gtofp_bit 7047942
RgX_normalize1 35705
X2XP1 5990586
ZX_Uspensky 1313876
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15205
ZX_graeffe 5439
ZX_realroots_irred 48572
ZX_rescale2prim 2233802
ZX_sturm 6395
ZX_sturm_i 123071
ZX_sturm_irred 116676
ZX_sturmpart 1128282
ZX_to_ZiX 16489370
ZiX_sqr 99214139
_gen_nored 11200561
_gen_one 14470958
_gen_zero 326017
_intervalcmp 0
_mp_add 24660739
_mp_cmul 34763280
_mp_mul 4374432
_mp_sqr 6298295
_mp_sub 0
_sqrtnr 22596
a_posteriori_errors 537470
abs_update 8021034
abs_update_r 780121
all_roots 536364
append_clone 1616148
bkeval_single_power 5234982
check_ab 1178909
checkbound 2354947
checkvalidpol 267214
clean_roots 536408
cleanroots 231763
cmp_complex_appr 2241452
conformal_basecase 1406435
conformal_mapping 468773
conformal_pol 1406556
dblexp 6562399
dbllog2 303910852
dft 503315
dual_modulus 1014470
eval_rel_pol 13168157
fft 14194190
fft2 7462
findpower 41027091
fix_roots 537465
fix_roots1 398782
fujiwara_bound 2272832
fujiwara_bound_real 1406965
graeffe 49600880
homothetie 1613550
homothetie2n 9978811
homothetie_gauss 36562026
ind_maxlog2 904351
initdft 998239
isexactpol 240103
isexactscalar 934017
isreal 963697
isvalidcoeff 1230445
logmax_modulus 4458556
logmin_modulus 1617672
logmodulus 608212
logpre_modulus 608211
logradius 494925
lower_bound 41026968
mydbllog2i 226765516
mydbllog2r 57614362
mydbllogr 9565680
mygprec 63860894
mygprec_absolute 4344068
mygprec_special 537475
mygprecrc 215553431
mygprecrc_special 2181398
myshiftic 136061647
myshiftrc 35575977
newton_polygon 5520632
optimize_split 494926
parameters 494925
pol_to_gaussint 17626652
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166704
quicktofp 6984239
realroots 50627
refine_F 503313
refine_H 2464570
root_error 1914400
roots 8368
roots_aux 240131
roots_com 240103
rootsdeg0 42
scalepol 4297327
scalepol2n 0
sol_ok 3378
solve_exact_pol 231495
split_0 495293
split_0_1 469143
split_0_2 469144
split_1 468773
split_2 494924
split_complete 1528060
split_fromU 494925
split_pols 166705
splitcauchy 166712
splitpoleval 5235058
tocomplex 1215847
update_radius 494924
usp 1126085

Generated by: LCOV version 1.16