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 30364-8108102770) Lines: 1467 1530 95.9 %
Date: 2025-06-30 09:21:07 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 5383
ZX_sturm 6395
fft2 7462
roots 8018
ZX_deg1root 15275
_sqrtnr 22709
polrootsbound_i 27293
polrootsbound 27300
RgX_normalize1 35887
ZX_realroots_irred 48624
realroots 50627
ZX_sturm_irred 116751
ZX_sturm_i 123146
split_pols 166628
polsolve 166632
splitcauchy 166636
solve_exact_pol 231040
cleanroots 231644
isexactpol 239634
roots_com 239634
roots_aux 239662
checkvalidpol 266941
QX_complex_roots 290019
_gen_zero 325950
fix_roots1 394087
conformal_mapping 467799
split_1 467799
split_0_1 468117
split_0_2 468117
parameters 493842
split_2 493844
update_radius 493845
logradius 493846
optimize_split 493847
split_fromU 493847
split_0 494164
refine_F 502230
dft 502236
all_roots 529604
clean_roots 529657
a_posteriori_errors 530657
fix_roots 530662
mygprec_special 530664
logmodulus 606617
logpre_modulus 606619
abs_update_r 778408
ind_maxlog2 902417
isexactscalar 931280
isreal 961645
initdft 996077
dual_modulus 1012192
usp 1126020
ZX_sturmpart 1128234
check_ab 1178861
tocomplex 1201017
isvalidcoeff 1229675
ZX_Uspensky 1313839
conformal_basecase 1403507
conformal_pol 1403625
fujiwara_bound_real 1406839
split_complete 1518990
append_clone 1603049
homothetie 1609690
logmin_modulus 1614462
root_error 1899218
mygprecrc_special 2161077
cmp_complex_appr 2231742
ZX_rescale2prim 2233814
fujiwara_bound 2265078
checkbound 2354852
refine_H 2459824
scalepol 4288240
mygprec_absolute 4300428
_mp_mul 4373428
logmax_modulus 4449919
bkeval_single_power 5222967
splitpoleval 5223072
newton_polygon 5505890
X2XP1 5990396
_mp_sqr 6291682
dblexp 6547452
quicktofp 6961126
RgX_gtofp_bit 7023487
abs_update 8003609
mydbllogr 9544679
homothetie2n 9955478
_gen_nored 11175266
eval_rel_pol 13135050
fft 14157706
_gen_one 14440741
ZX_to_ZiX 16456262
pol_to_gaussint 17584953
_mp_add 24650918
_mp_cmul 34725978
myshiftrc 35500389
homothetie_gauss 36488531
lower_bound 40945595
findpower 40945678
graeffe 49494085
mydbllog2r 56780605
mygprec 63700162
ZiX_sqr 99005884
myshiftic 135790979
mygprecrc 215007015
mydbllog2i 224308550
dbllog2 300591478

Generated by: LCOV version 1.16