Skip to main content

Crate hyperreal

Crate hyperreal 

Source
Expand description

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.

Structs§

Computable
Computable approximation of a Real number.
DomainFacts
Domain facts for common unary functions.
IdentityFacts
Exact identity facts that are cheap enough to compute from stored fields.
MagnitudeBits
A known most-significant binary digit for a nonzero value.
OrderingFacts
Cheap comparisons used by domain gates and filters.
PrimitiveFacts
Primitive range facts for named rendering, IO, diagnostics, or external solver export planning.
Rational
Ratio of two integers
RationalFacts
Exact-rational facts derived without approximation.
Real
(More) Real numbers
RealDetailedFacts
Opt-in detailed facts for callers that can use richer structural dispatch.
RealExactSetFacts
Exact-rational structure shared by a borrowed set of Real values.
RealStructuralFacts
Conservative public facts about a real value.
SymbolicDependencyMask
Opaque bit mask of symbolic dependencies visible in a Real.
SymbolicFacts
Coarse facts about the symbolic certificate.

Enums§

CertifiedRealEquality
Result of asking whether two Real values are mathematically equal under a bounded exact-real policy.
CertifiedRealOrdering
Result of asking for a certified ordering under a bounded exact-real policy.
CertifiedRealSign
Result of asking a Real for a certified sign under a bounded policy.
DomainStatus
Conservative domain status for common real-valued functions.
ExpressionDegree
Coarse bounded expression degree for structural dispatch.
PrimitiveFloatStatus
Conservative primitive floating-point range classification.
Problem
Problems when either parsing or attempting Arithmetic with Real numbers or when trying to make or convert to a Rational.
RationalStorageClass
Coarse exact-rational storage cost bucket.
RealEqualityCertificate
Source of a certified equality or inequality decision between two Real values.
RealExactSetDenominatorKind
Coarse denominator class for an exact borrowed set with a shared scale.
RealExactSetDyadicExponentClass
Coarse class for the largest dyadic denominator exponent in a borrowed set.
RealExactSetSignPattern
Conservative sign pattern for a borrowed set of Real values.
RealOrderingCertificate
Source of a certified ordering decision between two Real values.
RealSign
Exact sign knowledge exposed by structural inspection.
RealSignCertificate
Source of a certified RealSign decision.
StructuralComparison
Known comparison result for cheap structural threshold tests.
StructuralKind
Coarse public category for the symbolic certificate carried by a Real.
ZeroKnowledge
Whether structural inspection can prove zero or nonzero status.
ZeroOneMinusOneStatus
Cheap exact classification for signed unit and zero values.
ZeroOneStatus
Cheap exact classification for values that are commonly special-cased.