Encoded numerical systems #
NumericalSystem is the family-independent interface of FloatLib. It says only what code type
is stored, what mathematical scalar domain finite codes denote, and how every code is interpreted.
It does not assume a radix, exponent field, NaN convention, or rounding rule.
This small interface is broad enough for binary and decimal floats, fixed point, posits, logarithmic number systems, block-scaled values, and exact integers. Concrete arithmetic and its proofs remain in the corresponding implementation modules.
A representation together with its complete mathematical interpretation.
- Code : Type u
Stored or executable values of the system.
- Scalar : Type v
Exact mathematical domain used to interpret ordinary codes.
- denote : self.Code → NumericalValue self.Scalar
Meaning of every code, including infinities and exceptional words.
Instances For
Build a numerical system whose every code has an ordinary finite interpretation.
This is the common representation shape for exact integers, fixed-point values, logarithmic codes, and other formats without infinities or exceptional words.
Instances For
code represents the ordinary scalar x.
Instances For
In an ofFinite system, representation is equality after decoding.
Exact-system representation is ordinary equality.
An exact scalar is representable when some code denotes it.
Instances For
Two codes are semantically equivalent, even if their bit patterns differ.
Instances For
A code has an ordinary finite meaning.
Instances For
Change only the mathematical codomain of a numerical system.
Instances For
A represented scalar remains represented after mapping the system's scalar codomain.