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 30792-987d9c52f6) Lines: 1467 1530 95.9 %
Date: 2026-04-09 09:26:26 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 27095
polrootsbound 27102
RgX_normalize1 35703
ZX_realroots_irred 48568
realroots 50627
ZX_sturm_irred 116667
ZX_sturm_i 123063
split_pols 166706
polsolve 166707
splitcauchy 166713
solve_exact_pol 231495
cleanroots 231763
isexactpol 240103
roots_com 240103
roots_aux 240131
checkvalidpol 267212
QX_complex_roots 296304
_gen_zero 326017
fix_roots1 398790
conformal_mapping 468775
split_1 468782
split_0_1 469150
split_0_2 469150
logradius 494924
update_radius 494925
split_2 494926
parameters 494927
optimize_split 494930
split_fromU 494930
split_0 495296
refine_F 503314
dft 503323
all_roots 536363
clean_roots 536413
a_posteriori_errors 537469
fix_roots 537470
mygprec_special 537472
logpre_modulus 608216
logmodulus 608217
abs_update_r 780141
ind_maxlog2 904339
isexactscalar 934017
isreal 963712
initdft 998250
dual_modulus 1014472
usp 1126154
ZX_sturmpart 1128335
check_ab 1178957
tocomplex 1215872
isvalidcoeff 1230439
ZX_Uspensky 1313938
conformal_basecase 1406458
conformal_pol 1406575
fujiwara_bound_real 1407014
split_complete 1528060
homothetie 1613557
append_clone 1616175
logmin_modulus 1617688
root_error 1914393
mygprecrc_special 2181415
ZX_rescale2prim 2233922
cmp_complex_appr 2241477
fujiwara_bound 2272040
checkbound 2355068
refine_H 2464571
scalepol 4297363
mygprec_absolute 4344181
_mp_mul 4374496
logmax_modulus 4458613
bkeval_single_power 5234781
splitpoleval 5234910
newton_polygon 5520725
X2XP1 5990903
_mp_sqr 6298396
dblexp 6562486
quicktofp 6981488
RgX_gtofp_bit 7048058
abs_update 8020754
mydbllogr 9565254
homothetie2n 9978930
_gen_nored 11198471
eval_rel_pol 13168195
fft 14194204
_gen_one 14471079
ZX_to_ZiX 16490360
pol_to_gaussint 17626850
_mp_add 24661752
_mp_cmul 34758542
myshiftrc 35576552
homothetie_gauss 36561870
lower_bound 41027374
findpower 41028043
graeffe 49602311
mydbllog2r 57610633
mygprec 63861430
ZiX_sqr 99222444
myshiftic 136072126
mygprecrc 215561243
mydbllog2i 226844539
dbllog2 303987485

Generated by: LCOV version 1.16