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.
- Hyper
Value - A hyperreal value with the infinitesimal it is written in.
- Natural
Value - 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§
- Hyper
Form - 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 indt; 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
opwhen either operand is an exact type;Nonewhen 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_byteswrote;Nonefor 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_byteswrote;Nonefor 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;Nonewhenvis 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
moduluslimited toallowed. - new_
ordered_ infinitesimal - An infinitesimal declared much smaller than
largerand much larger thansmaller, each an infinitesimal ornothing. - not
notlifted over residue branches and through provisional values;Nonefor any other value.- provisional
- A provisional answer: the current guess after
stepscases withrevisionschanges. - relation
- Apply
relwhen either operand is an exact type;Nonewhen neither is. - scale_
from_ parts - The scale
scale_partswrote. - 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;
Nonewhen neither value is exact. - undecided_
branch - Why a value cannot decide a branch, or
None.
Type Aliases§
- Depends
Value - A runtime value that depends on the residue of
⌈1/dt⌉.