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.
- Domain
Facts - Domain facts for common unary functions.
- Identity
Facts - Exact identity facts that are cheap enough to compute from stored fields.
- Magnitude
Bits - A known most-significant binary digit for a nonzero value.
- Ordering
Facts - Cheap comparisons used by domain gates and filters.
- Primitive
Facts - Primitive range facts for named rendering, IO, diagnostics, or external solver export planning.
- Rational
- Ratio of two integers
- Rational
Facts - Exact-rational facts derived without approximation.
- Real
- (More) Real numbers
- Real
Detailed Facts - Opt-in detailed facts for callers that can use richer structural dispatch.
- Real
Exact SetFacts - Exact-rational structure shared by a borrowed set of
Realvalues. - Real
Structural Facts - Conservative public facts about a real value.
- Symbolic
Dependency Mask - Opaque bit mask of symbolic dependencies visible in a
Real. - Symbolic
Facts - Coarse facts about the symbolic certificate.
Enums§
- Certified
Real Equality - Result of asking whether two
Realvalues are mathematically equal under a bounded exact-real policy. - Certified
Real Ordering - Result of asking for a certified ordering under a bounded exact-real policy.
- Certified
Real Sign - Result of asking a
Realfor a certified sign under a bounded policy. - Domain
Status - Conservative domain status for common real-valued functions.
- Expression
Degree - Coarse bounded expression degree for structural dispatch.
- Primitive
Float Status - Conservative primitive floating-point range classification.
- Problem
- Problems when either parsing or attempting Arithmetic with
Realnumbers or when trying to make or convert to aRational. - Rational
Storage Class - Coarse exact-rational storage cost bucket.
- Real
Equality Certificate - Source of a certified equality or inequality decision between two
Realvalues. - Real
Exact SetDenominator Kind - Coarse denominator class for an exact borrowed set with a shared scale.
- Real
Exact SetDyadic Exponent Class - Coarse class for the largest dyadic denominator exponent in a borrowed set.
- Real
Exact SetSign Pattern - Conservative sign pattern for a borrowed set of
Realvalues. - Real
Ordering Certificate - Source of a certified ordering decision between two
Realvalues. - Real
Sign - Exact sign knowledge exposed by structural inspection.
- Real
Sign Certificate - Source of a certified
RealSigndecision. - Structural
Comparison - Known comparison result for cheap structural threshold tests.
- Structural
Kind - Coarse public category for the symbolic certificate carried by a
Real. - Zero
Knowledge - Whether structural inspection can prove zero or nonzero status.
- Zero
OneMinus OneStatus - Cheap exact classification for signed unit and zero values.
- Zero
OneStatus - Cheap exact classification for values that are commonly special-cased.