Skip to main content

Module exact

Module exact 

Source
Expand description

The exact real types in the interpreter’s value model: real algebraic numbers, computable reals, the program’s infinitesimal and the hyperreals it generates, infinite integers, ordinals, and the values a supertask leaves.

How they mix with the numeric tower and with each other is decided once, in logicaffeine_base::tower, generic over a value model; this module is where RuntimeValue joins it, so the tree-walker and the VM compute exactly what a compiled program computes.

Structs§

Branch
One branch of a residue-dependent value, compared by value.
HyperValue
A hyperreal value with the infinitesimal it is written in.
NaturalValue
An infinite integer with the infinitesimal whose reciprocal generates it.
Scale
An infinitesimal of the program: the name it was declared under, what is known about the residues of its reciprocal, the infinite natural ⌈1/dt⌉, and where it stands among the others.

Enums§

HyperForm
A hyperreal’s representations: an exact rational function of dt; a real algebraic Puiseux series that is none, a root of one (crate::puiseux); the germ a flow leaves, known by its series in dt; or a value of several ordered infinitesimals (Multi). A Puiseux series compares and hashes by its value, a germ by its canonical encoding.
Op
The arithmetic operators the exact types take.
Rel
The relational operators the exact types answer.
Rounding
How an integer part rounds: down, up, or to the nearest integer with ties away from zero (the tower’s round).

Functions§

apply_limit
Resolve a residue-dependent value under a limit rule.
arith
Apply op when either operand is an exact type; None when neither is.
depends_from_parts
A residue-dependent value rebuilt from its scale, modulus and per-class values.
display
How an exact value prints.
exact_bytes
An algebraic number, computable real or ordinal as its kind and canonical bytes.
from_algebraic
The canonical runtime value of an algebraic number: a rational is an Int/BigInt/Rational.
from_depends
The canonical runtime value of a residue-dependent value.
from_exact_bytes
The value exact_bytes wrote; None for a forged or non-canonical encoding.
from_exact_real
The canonical runtime value of a computable real: an algebraic one is an algebraic number.
from_germ
The canonical runtime value of a germ.
from_hyper
The canonical runtime value of a hyperreal.
from_natural
The canonical runtime value of an infinite integer.
from_ordinal
A finite ordinal is a natural number.
from_scaled_bytes
The value scaled_bytes wrote; None for a forged or non-canonical encoding.
generator_of
The infinite natural ⌈1/dt⌉ generated by an infinitesimal value.
germ_of
A number as a germ, or None.
integer_part
The integer part of an exact value under mode; None when v is not one.
is_exact_value
True for a value of one of the exact types.
is_infinitesimal
x ≈ 0: zero or an infinitesimal.
is_limited
Bounded by a standard number.
limit_rule
A limit rule by its English name.
new_infinitesimal
The program’s infinitesimal, its reciprocal’s residues modulo modulus limited to allowed.
new_ordered_infinitesimal
An infinitesimal declared much smaller than larger and much larger than smaller, each an infinitesimal or nothing.
not
not lifted over residue branches and through provisional values; None for any other value.
provisional
A provisional answer: the current guess after steps cases with revisions changes.
relation
Apply rel when either operand is an exact type; None when neither is.
scale_from_parts
The scale scale_parts wrote.
scale_parts
The infinitesimal’s name and its reciprocal’s residue facts.
scaled_bytes
A hyperreal, infinite integer or germ as its kind, scale and canonical bytes.
standard_part
The standard part of a limited value.
structurally_equal
Structural equality for collections and hashing; None when neither value is exact.
undecided_branch
Why a value cannot decide a branch, or None.

Type Aliases§

DependsValue
A runtime value that depends on the residue of ⌈1/dt⌉.