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 30610-dfc8ed42cd) Lines: 1467 1530 95.9 %
Date: 2026-01-14 09:22:13 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 296163
RgX_gtofp_bit 7028876
RgX_normalize1 35731
X2XP1 5989463
ZX_Uspensky 1313675
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15202
ZX_graeffe 5390
ZX_realroots_irred 48565
ZX_rescale2prim 2233404
ZX_sturm 6395
ZX_sturm_i 122975
ZX_sturm_irred 116580
ZX_sturmpart 1128177
ZX_to_ZiX 16448205
ZiX_sqr 99002216
_gen_nored 11196820
_gen_one 14470062
_gen_zero 325987
_intervalcmp 0
_mp_add 24660256
_mp_cmul 34756567
_mp_mul 4374469
_mp_sqr 6298095
_mp_sub 0
_sqrtnr 22594
a_posteriori_errors 536973
abs_update 8003279
abs_update_r 778520
all_roots 535870
append_clone 1613489
bkeval_single_power 5234488
check_ab 1178804
checkbound 2354738
checkvalidpol 266890
clean_roots 535918
cleanroots 231763
cmp_complex_appr 2237179
conformal_basecase 1403450
conformal_mapping 467778
conformal_pol 1403570
dblexp 6547093
dbllog2 302010512
dft 502220
dual_modulus 1012163
eval_rel_pol 13134025
fft 14154601
fft2 7462
findpower 40942182
fix_roots 536975
fix_roots1 398347
fujiwara_bound 2270955
fujiwara_bound_real 1406665
graeffe 49493226
homothetie 1609580
homothetie2n 9954199
homothetie_gauss 36486265
ind_maxlog2 902409
initdft 996051
isexactpol 239753
isexactscalar 931714
isreal 961610
isvalidcoeff 1228142
logmax_modulus 4449372
logmin_modulus 1614303
logmodulus 606535
logpre_modulus 606531
logradius 493829
lower_bound 40941997
mydbllog2i 226352557
mydbllog2r 56169398
mydbllogr 9544034
mygprec 63739420
mygprec_absolute 4337345
mygprec_special 536979
mygprecrc 215116923
mygprecrc_special 2178236
myshiftic 135791160
myshiftrc 35494424
newton_polygon 5505084
optimize_split 493832
parameters 493829
pol_to_gaussint 17583227
polgraeffe 14
polmod_to_embed 84
polrootsbound 27130
polrootsbound_i 27123
polsolve 166696
quicktofp 6976575
realroots 50627
refine_F 502217
refine_H 2459874
root_error 1911569
roots 8018
roots_aux 239781
roots_com 239753
rootsdeg0 42
scalepol 4288066
scalepol2n 0
sol_ok 3378
solve_exact_pol 231145
split_0 494192
split_0_1 468140
split_0_2 468135
split_1 467779
split_2 493827
split_complete 1525360
split_fromU 493832
split_pols 166691
splitcauchy 166703
splitpoleval 5234932
tocomplex 1213141
update_radius 493830
usp 1125878

Generated by: LCOV version 1.16