decimal-scaled 0.5.0

Const-generic base-10 fixed-point decimals (D18/D38/D76/D153/D307 and the half-width tiers up to D1232) with integer-only transcendentals correctly rounded to within 0.5 ULP — exact at the type's last representable place. Deterministic across every platform; no_std-friendly.
Documentation
// SPDX-FileCopyrightText: 2026 John Moxley
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Square-root algorithm family.
//!
//! Each variant in this module is a kernel — a free function taking the
//! raw storage integer plus the runtime scale and rounding mode, and
//! returning the raw storage integer of the square root. The per-`(N,
//! SCALE)` choice between them lives in [`crate::policy::sqrt`].
//!
//! Surviving algorithms (Phase-4 consolidation):
//!
//! - [`sqrt_newton`] — Newton integer `isqrt` over a work integer `W`
//!   that strictly covers `raw · 10^SCALE`. Generic over the storage and
//!   work widths `(S, W)`; the default for every wide tier (D57 … D1232)
//!   and, via the policy's widen-to-`Int<2>` strategy, the narrow tiers.
//!   The result is exact to the last representable place (within 0.5 ULP)
//!   under any of the six [`RoundingMode`]s.
//! - [`sqrt_mg_divide`] — hand-tuned `mul_u128_to_u256` + 256-bit
//!   `isqrt_256` tailored to D38's `Int<2>` storage. **Width-bespoke for
//!   `N == 2`.**
//! - [`sqrt_newton_with_table_seed`] — `f64`-seeded narrow-work Newton
//!   bespoke for the `(D57, 20)` cell.
//! - [`sqrt_native`] — top-bits-`f64`-seeded Newton run directly in a
//!   tight, concrete `Int<W>` (no build-max slice scratch), for the
//!   regressed mid-scale wide cells (D76 … D307). Bit-identical to
//!   [`sqrt_newton`].
//!
//! [`sqrt_newton`]: crate::algos::sqrt::sqrt_newton::sqrt_newton
//! [`sqrt_native`]: crate::algos::sqrt::sqrt_native::sqrt_native
//! [`sqrt_mg_divide`]: crate::algos::sqrt::sqrt_mg_divide::sqrt_mg_divide
//! [`sqrt_newton_with_table_seed`]: crate::algos::sqrt::sqrt_newton_with_table_seed::sqrt_newton_with_table_seed
//! [`RoundingMode`]: crate::support::rounding::RoundingMode

pub(crate) mod sqrt_mg_divide;
pub(crate) mod sqrt_native;
pub(crate) mod sqrt_newton;
pub(crate) mod sqrt_newton_with_table_seed;