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 30748-2ce22a5f1f) Lines: 1467 1530 95.9 %
Date: 2026-03-18 09:25:54 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 15199
_sqrtnr 22592
polrootsbound_i 27097
polrootsbound 27104
RgX_normalize1 35705
ZX_realroots_irred 48568
realroots 50627
ZX_sturm_irred 116673
ZX_sturm_i 123068
polsolve 166695
split_pols 166695
splitcauchy 166711
solve_exact_pol 231495
cleanroots 231763
isexactpol 240103
roots_com 240103
roots_aux 240131
checkvalidpol 267214
QX_complex_roots 296305
_gen_zero 325988
fix_roots1 398785
split_1 468781
conformal_mapping 468783
split_0_1 469150
split_0_2 469151
logradius 494926
parameters 494926
update_radius 494930
split_fromU 494931
split_2 494932
optimize_split 494933
split_0 495303
refine_F 503319
dft 503326
all_roots 536367
clean_roots 536412
fix_roots 537465
a_posteriori_errors 537466
mygprec_special 537473
logpre_modulus 608221
logmodulus 608223
abs_update_r 780129
ind_maxlog2 904364
isexactscalar 934017
isreal 963713
initdft 998257
dual_modulus 1014495
usp 1126071
ZX_sturmpart 1128239
check_ab 1178867
tocomplex 1215882
isvalidcoeff 1230445
ZX_Uspensky 1313840
conformal_basecase 1406468
conformal_pol 1406588
fujiwara_bound_real 1406915
split_complete 1528072
homothetie 1613581
append_clone 1616160
logmin_modulus 1617711
root_error 1914404
mygprecrc_special 2181407
ZX_rescale2prim 2233894
cmp_complex_appr 2241498
fujiwara_bound 2271936
checkbound 2354863
refine_H 2464617
scalepol 4297425
mygprec_absolute 4344091
_mp_mul 4374574
logmax_modulus 4458648
bkeval_single_power 5235047
splitpoleval 5235606
newton_polygon 5520757
X2XP1 5990771
_mp_sqr 6298291
dblexp 6562643
quicktofp 6981200
RgX_gtofp_bit 7048101
abs_update 8021475
mydbllogr 9565945
homothetie2n 9979058
_gen_nored 11203013
eval_rel_pol 13168533
fft 14194766
_gen_one 14471962
ZX_to_ZiX 16492392
pol_to_gaussint 17627070
_mp_add 24662146
_mp_cmul 34765563
myshiftrc 35577292
homothetie_gauss 36563411
findpower 41028428
lower_bound 41028815
graeffe 49606545
mydbllog2r 57611534
mygprec 63864956
ZiX_sqr 99229579
myshiftic 136125875
mygprecrc 215574590
mydbllog2i 226878007
dbllog2 304060154

Generated by: LCOV version 1.16