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 30569-8181146aa1) Lines: 1467 1530 95.9 %
Date: 2025-12-03 09:22:05 Functions: 116 119 97.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FFT 56
FFT_i 98
FFTinv 56
QX_complex_roots 296483
RgX_gtofp_bit 7031680
RgX_normalize1 35908
X2XP1 5990097
ZX_Uspensky 1313939
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15273
ZX_graeffe 5390
ZX_realroots_irred 48652
ZX_rescale2prim 2233656
ZX_sturm 6395
ZX_sturm_i 123190
ZX_sturm_irred 116795
ZX_sturmpart 1128277
ZX_to_ZiX 16453142
ZiX_sqr 99027011
_gen_nored 11202621
_gen_one 14472900
_gen_zero 326138
_intervalcmp 0
_mp_add 24662116
_mp_cmul 34767251
_mp_mul 4374579
_mp_sqr 6298258
_mp_sub 0
_sqrtnr 22707
a_posteriori_errors 537290
abs_update 8005097
abs_update_r 778690
all_roots 536190
append_clone 1614294
bkeval_single_power 5235771
check_ab 1178904
checkbound 2354938
checkvalidpol 267067
clean_roots 536233
cleanroots 231763
cmp_complex_appr 2238709
conformal_basecase 1403879
conformal_mapping 467920
conformal_pol 1403997
dblexp 6548978
dbllog2 302085964
dft 502361
dual_modulus 1012463
eval_rel_pol 13138245
fft 14159024
fft2 7462
findpower 40954231
fix_roots 537289
fix_roots1 398483
fujiwara_bound 2271981
fujiwara_bound_real 1406980
graeffe 49504812
homothetie 1610103
homothetie2n 9957706
homothetie_gauss 36495801
ind_maxlog2 902663
initdft 996334
isexactpol 239753
isexactscalar 931714
isreal 961891
isvalidcoeff 1230270
logmax_modulus 4450820
logmin_modulus 1614752
logmodulus 606759
logpre_modulus 606760
logradius 493970
lower_bound 40954386
mydbllog2i 226419384
mydbllog2r 56181589
mydbllogr 9546579
mygprec 63757776
mygprec_absolute 4340571
mygprec_special 537298
mygprecrc 215176628
mygprecrc_special 2179372
myshiftic 135817565
myshiftrc 35506498
newton_polygon 5507252
optimize_split 493975
parameters 493974
pol_to_gaussint 17588984
polgraeffe 14
polmod_to_embed 84
polrootsbound 27307
polrootsbound_i 27300
polsolve 166718
quicktofp 6979568
realroots 50627
refine_F 502357
refine_H 2460444
root_error 1912774
roots 8018
roots_aux 239781
roots_com 239753
rootsdeg0 42
scalepol 4289351
scalepol2n 0
sol_ok 3378
solve_exact_pol 231145
split_0 494336
split_0_1 468280
split_0_2 468280
split_1 467918
split_2 493970
split_complete 1525953
split_fromU 493975
split_pols 166719
splitcauchy 166729
splitpoleval 5235619
tocomplex 1214162
update_radius 493971
usp 1126040

Generated by: LCOV version 1.16