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 30786-ffec283a2b) Lines: 1467 1530 95.9 %
Date: 2026-04-07 09:25:56 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 15204
_sqrtnr 22597
polrootsbound_i 27097
polrootsbound 27104
RgX_normalize1 35705
ZX_realroots_irred 48573
realroots 50627
ZX_sturm_irred 116673
ZX_sturm_i 123068
split_pols 166697
polsolve 166703
splitcauchy 166706
solve_exact_pol 231495
cleanroots 231763
isexactpol 240103
roots_com 240103
roots_aux 240131
checkvalidpol 267214
QX_complex_roots 296309
_gen_zero 325993
fix_roots1 398789
split_1 468778
conformal_mapping 468779
split_0_1 469145
split_0_2 469145
logradius 494923
parameters 494924
update_radius 494925
split_2 494926
split_fromU 494926
optimize_split 494927
split_0 495299
refine_F 503315
dft 503319
all_roots 536370
clean_roots 536405
fix_roots 537466
a_posteriori_errors 537470
mygprec_special 537474
logpre_modulus 608211
logmodulus 608220
abs_update_r 780123
ind_maxlog2 904362
isexactscalar 934017
isreal 963689
initdft 998245
dual_modulus 1014482
usp 1126044
ZX_sturmpart 1128277
check_ab 1178904
tocomplex 1215854
isvalidcoeff 1230445
ZX_Uspensky 1313870
conformal_basecase 1406449
conformal_pol 1406569
fujiwara_bound_real 1406950
split_complete 1528064
homothetie 1613560
append_clone 1616166
logmin_modulus 1617668
root_error 1914412
mygprecrc_special 2181405
ZX_rescale2prim 2233701
cmp_complex_appr 2241479
fujiwara_bound 2271982
checkbound 2354936
refine_H 2464574
scalepol 4297378
mygprec_absolute 4344066
_mp_mul 4374517
logmax_modulus 4458567
bkeval_single_power 5234488
splitpoleval 5234845
newton_polygon 5520668
X2XP1 5990324
_mp_sqr 6298152
dblexp 6562445
quicktofp 6981316
RgX_gtofp_bit 7048029
abs_update 8021070
mydbllogr 9565740
homothetie2n 9978843
_gen_nored 11199562
eval_rel_pol 13168358
fft 14194115
_gen_one 14469367
ZX_to_ZiX 16490651
pol_to_gaussint 17626840
_mp_add 24660395
_mp_cmul 34759673
myshiftrc 35576035
homothetie_gauss 36560659
lower_bound 41024037
findpower 41024516
graeffe 49601224
mydbllog2r 57610425
mygprec 63861238
ZiX_sqr 99212318
myshiftic 136063309
mygprecrc 215556252
mydbllog2i 226832566
dbllog2 303972853

Generated by: LCOV version 1.16