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 30822-5d69697d32) Lines: 1467 1530 95.9 %
Date: 2026-04-17 09:24:44 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 7048759
RgX_normalize1 35705
X2XP1 5990358
ZX_Uspensky 1313927
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15201
ZX_graeffe 5439
ZX_realroots_irred 48564
ZX_rescale2prim 2233704
ZX_sturm 6395
ZX_sturm_i 123054
ZX_sturm_irred 116658
ZX_sturmpart 1128350
ZX_to_ZiX 16491453
ZiX_sqr 99219428
_gen_nored 11198531
_gen_one 14466289
_gen_zero 325966
_intervalcmp 0
_mp_add 24658902
_mp_cmul 34757212
_mp_mul 4374430
_mp_sqr 6297872
_mp_sub 0
_sqrtnr 22593
a_posteriori_errors 537475
abs_update 8021914
abs_update_r 780207
all_roots 536368
append_clone 1616252
bkeval_single_power 5234005
check_ab 1178977
checkbound 2355083
checkvalidpol 267228
clean_roots 536413
cleanroots 231763
cmp_complex_appr 2241705
conformal_basecase 1406574
conformal_mapping 468821
conformal_pol 1406693
dblexp 6563139
dbllog2 303934252
dft 503372
dual_modulus 1014586
eval_rel_pol 13169781
fft 14196523
fft2 7462
findpower 41028671
fix_roots 537482
fix_roots1 398803
fujiwara_bound 2272862
fujiwara_bound_real 1406991
graeffe 49605242
homothetie 1613736
homothetie2n 9979824
homothetie_gauss 36561179
ind_maxlog2 904434
initdft 998342
isexactpol 240117
isexactscalar 934122
isreal 963793
isvalidcoeff 1230557
logmax_modulus 4458903
logmin_modulus 1617792
logmodulus 608286
logpre_modulus 608284
logradius 494970
lower_bound 41029039
mydbllog2i 226775234
mydbllog2r 57617772
mydbllogr 9566666
mygprec 63866525
mygprec_absolute 4344326
mygprec_special 537490
mygprecrc 215569306
mygprecrc_special 2181518
myshiftic 136100290
myshiftrc 35579986
newton_polygon 5521262
optimize_split 494972
parameters 494969
pol_to_gaussint 17628657
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166700
quicktofp 6984086
realroots 50627
refine_F 503366
refine_H 2464787
root_error 1914490
roots 8382
roots_aux 240145
roots_com 240117
rootsdeg0 42
scalepol 4297746
scalepol2n 0
sol_ok 3378
solve_exact_pol 231509
split_0 495341
split_0_1 469190
split_0_2 469190
split_1 468821
split_2 494970
split_complete 1528159
split_fromU 494972
split_pols 166703
splitcauchy 166700
splitpoleval 5234338
tocomplex 1215954
update_radius 494970
usp 1126037

Generated by: LCOV version 1.16