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 30773-2078653b96) Lines: 1467 1530 95.9 %
Date: 2026-04-03 09:26:58 Functions: 116 119 97.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_intervalcmp 0
_mp_sub 0
scalepol2n 0
ZX_Uspensky_equal_yes 14
polgraeffe 14
ZX_Uspensky_no 21
ZX_Uspensky_equal 28
rootsdeg0 42
FFT 56
FFTinv 56
polmod_to_embed 84
FFT_i 98
sol_ok 3378
ZX_graeffe 5439
ZX_sturm 6395
fft2 7462
roots 8368
ZX_deg1root 15200
_sqrtnr 22593
polrootsbound_i 27097
polrootsbound 27104
RgX_normalize1 35705
ZX_realroots_irred 48569
realroots 50627
ZX_sturm_irred 116670
ZX_sturm_i 123065
split_pols 166695
polsolve 166704
splitcauchy 166711
solve_exact_pol 231495
cleanroots 231763
isexactpol 240103
roots_com 240103
roots_aux 240131
checkvalidpol 267214
QX_complex_roots 296307
_gen_zero 326006
fix_roots1 398790
conformal_mapping 468775
split_1 468776
split_0_1 469144
split_0_2 469144
logradius 494921
optimize_split 494925
parameters 494925
split_2 494925
split_fromU 494925
update_radius 494925
split_0 495294
refine_F 503315
dft 503321
all_roots 536366
clean_roots 536411
fix_roots 537471
mygprec_special 537471
a_posteriori_errors 537472
logmodulus 608214
logpre_modulus 608217
abs_update_r 780114
ind_maxlog2 904347
isexactscalar 934017
isreal 963698
initdft 998244
dual_modulus 1014478
usp 1126111
ZX_sturmpart 1128371
check_ab 1178999
tocomplex 1215861
isvalidcoeff 1230445
ZX_Uspensky 1313968
conformal_basecase 1406446
conformal_pol 1406566
fujiwara_bound_real 1407033
split_complete 1528057
homothetie 1613560
append_clone 1616154
logmin_modulus 1617679
root_error 1914392
mygprecrc_special 2181406
ZX_rescale2prim 2233781
cmp_complex_appr 2241479
fujiwara_bound 2272064
checkbound 2355128
refine_H 2464601
scalepol 4297336
mygprec_absolute 4344161
_mp_mul 4374452
logmax_modulus 4458569
splitpoleval 5235273
bkeval_single_power 5235549
newton_polygon 5520743
X2XP1 5990576
_mp_sqr 6298475
dblexp 6562479
quicktofp 6981377
RgX_gtofp_bit 7048016
abs_update 8021299
mydbllogr 9565599
homothetie2n 9978981
_gen_nored 11200113
eval_rel_pol 13168397
fft 14194441
_gen_one 14472075
ZX_to_ZiX 16491845
pol_to_gaussint 17627003
_mp_add 24660793
_mp_cmul 34761453
myshiftrc 35576579
homothetie_gauss 36564368
lower_bound 41029411
findpower 41030115
graeffe 49603574
mydbllog2r 57611930
mygprec 63862746
ZiX_sqr 99230973
myshiftic 136080537
mygprecrc 215578631
mydbllog2i 226868763
dbllog2 304005440

Generated by: LCOV version 1.16