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 30835-e55edf4b45) Lines: 1467 1530 95.9 %
Date: 2026-04-25 09:26:46 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 296303
RgX_gtofp_bit 7048669
RgX_normalize1 35705
X2XP1 5990975
ZX_Uspensky 1313980
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15204
ZX_graeffe 5439
ZX_realroots_irred 48574
ZX_rescale2prim 2233961
ZX_sturm 6395
ZX_sturm_i 123073
ZX_sturm_irred 116678
ZX_sturmpart 1128381
ZX_to_ZiX 16494604
ZiX_sqr 99231078
_gen_nored 11199762
_gen_one 14472211
_gen_zero 325998
_intervalcmp 0
_mp_add 24660582
_mp_cmul 34762250
_mp_mul 4374530
_mp_sqr 6298366
_mp_sub 0
_sqrtnr 22597
a_posteriori_errors 537481
abs_update 8021933
abs_update_r 780162
all_roots 536376
append_clone 1616242
bkeval_single_power 5234861
check_ab 1179008
checkbound 2355145
checkvalidpol 267228
clean_roots 536420
cleanroots 231763
cmp_complex_appr 2241598
conformal_basecase 1406564
conformal_mapping 468819
conformal_pol 1406683
dblexp 6563082
dbllog2 303904880
dft 503364
dual_modulus 1014561
eval_rel_pol 13169646
fft 14196505
fft2 7462
findpower 41030594
fix_roots 537478
fix_roots1 398801
fujiwara_bound 2272951
fujiwara_bound_real 1407067
graeffe 49603293
homothetie 1613704
homothetie2n 9979790
homothetie_gauss 36563799
ind_maxlog2 904413
initdft 998326
isexactpol 240117
isexactscalar 934122
isreal 963782
isvalidcoeff 1230557
logmax_modulus 4458905
logmin_modulus 1617811
logmodulus 608275
logpre_modulus 608273
logradius 494960
lower_bound 41030361
mydbllog2i 226763666
mydbllog2r 57620330
mydbllogr 9566715
mygprec 63865848
mygprec_absolute 4344353
mygprec_special 537485
mygprecrc 215586934
mygprecrc_special 2181497
myshiftic 136059146
myshiftrc 35579792
newton_polygon 5521220
optimize_split 494964
parameters 494963
pol_to_gaussint 17628558
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166709
quicktofp 6984605
realroots 50627
refine_F 503361
refine_H 2464725
root_error 1914496
roots 8382
roots_aux 240145
roots_com 240117
rootsdeg0 42
scalepol 4297715
scalepol2n 0
sol_ok 3378
solve_exact_pol 231509
split_0 495334
split_0_1 469189
split_0_2 469189
split_1 468818
split_2 494963
split_complete 1528146
split_fromU 494964
split_pols 166709
splitcauchy 166715
splitpoleval 5235292
tocomplex 1215956
update_radius 494962
usp 1126164

Generated by: LCOV version 1.16