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 30042-3924408baf) Lines: 1467 1530 95.9 %
Date: 2025-03-06 09:24:08 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 3350
ZX_sturm 3735
ZX_graeffe 5383
fft2 7462
roots 8018
ZX_deg1root 15309
_sqrtnr 22759
polrootsbound_i 27278
polrootsbound 27286
RgX_normalize1 35872
ZX_realroots_irred 48411
realroots 50613
ZX_sturm_irred 116496
ZX_sturm_i 120231
polsolve 165675
split_pols 165678
splitcauchy 165682
solve_exact_pol 231040
cleanroots 231644
isexactpol 239634
roots_com 239634
roots_aux 239662
checkvalidpol 266927
QX_complex_roots 289846
_gen_zero 323542
fix_roots1 394020
conformal_mapping 467832
split_1 467834
split_0_1 468154
split_0_2 468155
logradius 493631
optimize_split 493639
split_2 493639
split_fromU 493639
update_radius 493639
parameters 493641
split_0 493959
refine_F 502021
dft 502026
all_roots 529435
clean_roots 529485
fix_roots 530479
a_posteriori_errors 530485
mygprec_special 530488
logmodulus 606150
logpre_modulus 606151
abs_update_r 777988
ZX_sturmpart 876890
ind_maxlog2 902079
check_ab 927501
isexactscalar 931280
usp 937065
isreal 961473
initdft 995664
dual_modulus 1011800
ZX_Uspensky 1059562
fujiwara_bound_real 1149753
tocomplex 1199990
isvalidcoeff 1227643
conformal_basecase 1403617
conformal_pol 1403735
split_complete 1518401
append_clone 1602228
homothetie 1608861
logmin_modulus 1614420
checkbound 1852132
root_error 1897497
ZX_rescale2prim 1935599
fujiwara_bound 2006565
mygprecrc_special 2160073
cmp_complex_appr 2226975
refine_H 2459142
scalepol 4287860
mygprec_absolute 4296707
_mp_mul 4360598
logmax_modulus 4449374
splitpoleval 5195947
bkeval_single_power 5196050
X2XP1 5201447
newton_polygon 5501778
_mp_sqr 6273595
quicktofp 6447351
dblexp 6545749
RgX_gtofp_bit 7018760
abs_update 8000528
mydbllogr 9541512
homothetie2n 9950941
_gen_nored 11128699
eval_rel_pol 13128880
fft 14144705
_gen_one 14370759
ZX_to_ZiX 16461229
pol_to_gaussint 17578124
_mp_add 24579464
_mp_cmul 34612502
myshiftrc 35486221
homothetie_gauss 36492052
lower_bound 40946595
findpower 40946639
graeffe 49498051
mydbllog2r 55931165
mygprec 63648657
ZiX_sqr 99005399
myshiftic 135848011
mygprecrc 214854829
mydbllog2i 224324397
dbllog2 300313463

Generated by: LCOV version 1.16