Smallest e : Nat with 2^e ≥ 1 + max_{i<n} |aᵢ| / |aₙ| (the Cauchy
root bound): every complex root of p satisfies |z| < 2^e, so all
roots lie in the square of half-width 2^e about 0. Pure integer
arithmetic: with L := |aₙ| the leading magnitude and
M := max_{i<n} |aᵢ| the largest non-leading magnitude, take
e := ceilLog2 ⌈(L + M) / L⌉ = ceilLog2 ((L + M + L - 1) / L). Junk
0 when p is the zero polynomial (no leading coefficient).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The starting component: a single square centred at 0 covering the
Cauchy root bound, with candidateK = deg p. Its half-width is
2^{-prec} with prec = -(cauchyExp p), so its closed square
contains every complex root of p.
Equations
- Hex.Component.cauchy p _h = { squares := #[{ re := 0, im := 0, prec := -↑(Hex.cauchyExp p) }], candidateK := Hex.DensePoly.natDegree p }