hyperreal 0.12.0

Exact rational and computable real arithmetic in Rust
Documentation
//! Exact rational, symbolic real, and computable real arithmetic.
//!
//! `hyperreal` represents values as a mix of exact rationals, recognized
//! symbolic forms such as `pi`, `e`, logarithms, and trigonometric special
//! forms, and lazily evaluated computable expressions. The public structural
//! query APIs expose cheap conservative facts for callers that need to avoid
//! forcing high-precision evaluation. The lazy approximation layer follows the
//! exact-real arithmetic model described by Boehm et al.,
//! <https://doi.org/10.1145/319838.319860>.
//!
//! Exactness here is a certified-data contract, not a promise that every value
//! is eagerly reduced to one canonical scalar form. Following Yap's exact
//! geometric computation model, `Real` preserves rational, symbolic,
//! structural, and refinement facts so higher layers can make exact decisions
//! or return explicit uncertainty without hiding primitive-float fallbacks.
//! See Yap, "Towards Exact Geometric Computation," *Computational Geometry*,
//! 1997, pp. 3-23.

mod rational;
pub use crate::rational::Rational;

mod structural;
pub use crate::structural::{
    CertifiedRealEquality, CertifiedRealOrdering, CertifiedRealSign, DomainFacts, DomainStatus,
    ExpressionDegree, IdentityFacts, MagnitudeBits, OrderingFacts, PrimitiveFacts,
    PrimitiveFloatStatus, RationalFacts, RationalStorageClass, RealDetailedFacts,
    RealEqualityCertificate, RealOrderingCertificate, RealSign, RealSignCertificate,
    RealStructuralFacts, StructuralComparison, StructuralKind, SymbolicDependencyMask,
    SymbolicFacts, ZeroKnowledge, ZeroOneMinusOneStatus, ZeroOneStatus,
};

mod trace;
pub(crate) use trace::trace_dispatch;

#[cfg(feature = "dispatch-trace")]
pub mod dispatch_trace;

mod computable;
pub use crate::computable::Computable;

mod real;
pub use crate::real::{
    Real, RealExactSetDenominatorKind, RealExactSetDyadicExponentClass, RealExactSetFacts,
    RealExactSetSignPattern,
};

#[cfg(feature = "simple")]
mod simple;
#[cfg(feature = "simple")]
pub use crate::simple::Simple;

mod problem;
pub use crate::problem::Problem;

mod serde;