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-08 09:25:27 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 22593
polrootsbound_i 27096
polrootsbound 27103
RgX_normalize1 35704
ZX_realroots_irred 48568
realroots 50627
ZX_sturm_irred 116672
ZX_sturm_i 123066
polsolve 166698
split_pols 166699
splitcauchy 166701
solve_exact_pol 231495
cleanroots 231763
isexactpol 240103
roots_com 240103
roots_aux 240131
checkvalidpol 267213
QX_complex_roots 296311
_gen_zero 325974
fix_roots1 398790
conformal_mapping 468786
split_1 468786
split_0_1 469152
split_0_2 469152
logradius 494933
split_2 494937
update_radius 494938
parameters 494940
optimize_split 494941
split_fromU 494941
split_0 495309
refine_F 503328
dft 503333
all_roots 536362
clean_roots 536409
fix_roots 537471
a_posteriori_errors 537473
mygprec_special 537474
logpre_modulus 608232
logmodulus 608234
abs_update_r 780142
ind_maxlog2 904375
isexactscalar 934017
isreal 963727
initdft 998273
dual_modulus 1014507
usp 1126079
ZX_sturmpart 1128280
check_ab 1178907
tocomplex 1215874
isvalidcoeff 1230438
ZX_Uspensky 1313878
conformal_basecase 1406477
conformal_pol 1406598
fujiwara_bound_real 1406944
split_complete 1528090
homothetie 1613603
append_clone 1616176
logmin_modulus 1617725
root_error 1914423
mygprecrc_special 2181424
ZX_rescale2prim 2233836
cmp_complex_appr 2241494
fujiwara_bound 2271979
checkbound 2354944
refine_H 2464611
scalepol 4297458
mygprec_absolute 4344086
_mp_mul 4374426
logmax_modulus 4458684
bkeval_single_power 5234487
splitpoleval 5234705
newton_polygon 5520756
X2XP1 5990642
_mp_sqr 6298162
dblexp 6562676
quicktofp 6981342
RgX_gtofp_bit 7048143
abs_update 8020871
mydbllogr 9565539
homothetie2n 9979075
_gen_nored 11198872
eval_rel_pol 13168576
fft 14194689
_gen_one 14468956
ZX_to_ZiX 16491087
pol_to_gaussint 17627142
_mp_add 24659612
_mp_cmul 34757776
myshiftrc 35577574
homothetie_gauss 36562197
lower_bound 41025523
findpower 41026272
graeffe 49602653
mydbllog2r 57611579
mygprec 63861772
ZiX_sqr 99218795
myshiftic 136066795
mygprecrc 215554237
mydbllog2i 226844011
dbllog2 303983151

Generated by: LCOV version 1.16