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 30549-267e77144f) Lines: 1467 1530 95.9 %
Date: 2025-11-16 09:22:34 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 15273
_sqrtnr 22708
polrootsbound_i 27291
polrootsbound 27297
RgX_normalize1 35899
ZX_realroots_irred 48651
realroots 50627
ZX_sturm_irred 116773
ZX_sturm_i 123168
polsolve 166724
split_pols 166724
splitcauchy 166727
solve_exact_pol 231145
cleanroots 231763
isexactpol 239753
roots_com 239753
roots_aux 239781
checkvalidpol 267057
QX_complex_roots 296414
_gen_zero 326139
fix_roots1 398463
conformal_mapping 467931
split_1 467931
split_0_1 468296
split_0_2 468296
logradius 493980
split_2 493984
optimize_split 493985
parameters 493985
split_fromU 493985
update_radius 493985
split_0 494345
refine_F 502369
dft 502372
all_roots 536116
clean_roots 536169
fix_roots 537217
a_posteriori_errors 537226
mygprec_special 537229
logmodulus 606760
logpre_modulus 606762
abs_update_r 778659
ind_maxlog2 902674
isexactscalar 931714
isreal 961916
initdft 996358
dual_modulus 1012460
usp 1126087
ZX_sturmpart 1128294
check_ab 1178921
tocomplex 1213970
isvalidcoeff 1230220
ZX_Uspensky 1313938
conformal_basecase 1403904
conformal_pol 1404023
fujiwara_bound_real 1406963
split_complete 1525911
homothetie 1610103
append_clone 1614181
logmin_modulus 1614838
root_error 1912587
mygprecrc_special 2179187
ZX_rescale2prim 2233821
cmp_complex_appr 2238566
fujiwara_bound 2271812
checkbound 2354972
refine_H 2460530
scalepol 4289480
mygprec_absolute 4340025
_mp_mul 4374480
logmax_modulus 4451018
bkeval_single_power 5235745
splitpoleval 5235927
newton_polygon 5507224
X2XP1 5990519
_mp_sqr 6298183
dblexp 6549178
quicktofp 6979139
RgX_gtofp_bit 7031634
abs_update 8005372
mydbllogr 9546936
homothetie2n 9957938
_gen_nored 11201539
eval_rel_pol 13138334
fft 14159326
_gen_one 14471745
ZX_to_ZiX 16459699
pol_to_gaussint 17589321
_mp_add 24659240
_mp_cmul 34762615
myshiftrc 35507914
homothetie_gauss 36499035
lower_bound 40957652
findpower 40959624
graeffe 49509818
mydbllog2r 56183888
mygprec 63761144
ZiX_sqr 99042071
myshiftic 135830488
mygprecrc 215205185
mydbllog2i 226445703
dbllog2 302121816

Generated by: LCOV version 1.16