tokitai-operator 0.1.0

Verified DL kernel compiler: formally-checked GEMM, p-adic, sheaf, contract-carrying ops. Paper-artifact grade.
Documentation
//! Precision model: `Exact`, `FixedDigits`, etc.
//!
//! `PrecisionModel` is the abstract precision specification that
//! `Padic` and other bounded-precision types carry. The
//! `EqualityMode::Exact` (see `src/verify/equality.rs`) compares
//! values up to the active precision cutoff.
//!
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum PrecisionModel {
    Exact,
    Floating {
        bits: u16,
    },
    Fixed {
        digits: u32,
    },
    Adaptive {
        min_digits: u32,
        max_digits: Option<u32>,
    },
    Interval,
    Ball,
    Symbolic,
}

impl PrecisionModel {
    pub fn is_exact(&self) -> bool {
        matches!(self, Self::Exact)
    }
}