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 30816-9c15a02229) Lines: 1467 1530 95.9 %
Date: 2026-04-15 09:25:30 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 296306
RgX_gtofp_bit 7048346
RgX_normalize1 35705
X2XP1 5990859
ZX_Uspensky 1313913
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15202
ZX_graeffe 5439
ZX_realroots_irred 48569
ZX_rescale2prim 2233929
ZX_sturm 6395
ZX_sturm_i 123068
ZX_sturm_irred 116673
ZX_sturmpart 1128310
ZX_to_ZiX 16493683
ZiX_sqr 99224290
_gen_nored 11200849
_gen_one 14470888
_gen_zero 325971
_intervalcmp 0
_mp_add 24661016
_mp_cmul 34762221
_mp_mul 4374467
_mp_sqr 6298332
_mp_sub 0
_sqrtnr 22595
a_posteriori_errors 537469
abs_update 8021279
abs_update_r 780138
all_roots 536373
append_clone 1616191
bkeval_single_power 5235058
check_ab 1178939
checkbound 2355008
checkvalidpol 267221
clean_roots 536415
cleanroots 231763
cmp_complex_appr 2241556
conformal_basecase 1406537
conformal_mapping 468809
conformal_pol 1406658
dblexp 6562914
dbllog2 303951694
dft 503345
dual_modulus 1014528
eval_rel_pol 13169000
fft 14194963
fft2 7462
findpower 41030412
fix_roots 537468
fix_roots1 398789
fujiwara_bound 2272861
fujiwara_bound_real 1406990
graeffe 49605190
homothetie 1613639
homothetie2n 9979469
homothetie_gauss 36564305
ind_maxlog2 904396
initdft 998296
isexactpol 240110
isexactscalar 934073
isreal 963758
isvalidcoeff 1230501
logmax_modulus 4458877
logmin_modulus 1617814
logmodulus 608245
logpre_modulus 608243
logradius 494951
lower_bound 41029539
mydbllog2i 226796133
mydbllog2r 57618635
mydbllogr 9565879
mygprec 63863776
mygprec_absolute 4344237
mygprec_special 537477
mygprecrc 215573548
mygprecrc_special 2181451
myshiftic 136080359
myshiftrc 35579012
newton_polygon 5520969
optimize_split 494955
parameters 494951
pol_to_gaussint 17627686
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166713
quicktofp 6984329
realroots 50627
refine_F 503337
refine_H 2464682
root_error 1914445
roots 8375
roots_aux 240138
roots_com 240110
rootsdeg0 42
scalepol 4297613
scalepol2n 0
sol_ok 3378
solve_exact_pol 231502
split_0 495325
split_0_1 469176
split_0_2 469176
split_1 468806
split_2 494950
split_complete 1528115
split_fromU 494953
split_pols 166704
splitcauchy 166711
splitpoleval 5235326
tocomplex 1215903
update_radius 494954
usp 1126112

Generated by: LCOV version 1.16