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 30551-f8501633d1) Lines: 1467 1530 95.9 %
Date: 2025-11-20 09:22:21 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 5390
ZX_sturm 6395
fft2 7462
roots 8018
ZX_deg1root 15275
_sqrtnr 22710
polrootsbound_i 27293
polrootsbound 27300
RgX_normalize1 35900
ZX_realroots_irred 48654
realroots 50627
ZX_sturm_irred 116773
ZX_sturm_i 123168
polsolve 166721
split_pols 166722
splitcauchy 166729
solve_exact_pol 231145
cleanroots 231763
isexactpol 239753
roots_com 239753
roots_aux 239781
checkvalidpol 267060
QX_complex_roots 296415
_gen_zero 326162
fix_roots1 398468
conformal_mapping 467927
split_1 467928
split_0_2 468289
split_0_1 468290
logradius 493975
update_radius 493979
parameters 493981
split_2 493982
optimize_split 493983
split_fromU 493983
split_0 494345
refine_F 502367
dft 502372
all_roots 536124
clean_roots 536171
a_posteriori_errors 537225
fix_roots 537225
mygprec_special 537231
logpre_modulus 606769
logmodulus 606773
abs_update_r 778680
ind_maxlog2 902655
isexactscalar 931714
isreal 961907
initdft 996353
dual_modulus 1012463
usp 1126092
ZX_sturmpart 1128277
check_ab 1178904
tocomplex 1213967
isvalidcoeff 1230235
ZX_Uspensky 1313921
conformal_basecase 1403894
conformal_pol 1404015
fujiwara_bound_real 1406960
split_complete 1525901
homothetie 1610107
append_clone 1614196
logmin_modulus 1614800
root_error 1912577
mygprecrc_special 2179210
ZX_rescale2prim 2233859
cmp_complex_appr 2238589
fujiwara_bound 2271820
checkbound 2354938
refine_H 2460485
scalepol 4289423
mygprec_absolute 4340008
_mp_mul 4374485
logmax_modulus 4450970
splitpoleval 5235816
bkeval_single_power 5235988
newton_polygon 5507386
X2XP1 5990599
_mp_sqr 6298459
dblexp 6549138
quicktofp 6979244
RgX_gtofp_bit 7031773
abs_update 8005181
mydbllogr 9546808
homothetie2n 9957918
_gen_nored 11200011
eval_rel_pol 13138418
fft 14159926
_gen_one 14473293
ZX_to_ZiX 16457477
pol_to_gaussint 17589383
_mp_add 24660411
_mp_cmul 34761743
myshiftrc 35507688
homothetie_gauss 36499826
lower_bound 40956698
findpower 40958492
graeffe 49507151
mydbllog2r 56183596
mygprec 63758586
ZiX_sqr 99039300
myshiftic 135806189
mygprecrc 215195392
mydbllog2i 226426046
dbllog2 302081566

Generated by: LCOV version 1.16