Posit words and exceptional encodings #
The exact-width posit carrier, zero, and Not-a-Real words. These definitions support storage, equality, and bitwise reasoning. Regime parsing and finite decoding are defined in later modules.
@[instance_reducible]
instance
FloatLib.Floats.Formats.Posit.instDecidableEqModel
{format✝ : Format}
:
DecidableEq (Model format✝)
def
FloatLib.Floats.Formats.Posit.instReprModel.repr
{format✝ : Format}
:
Model format✝ → ℕ → Std.Format
Instances For
@[instance_reducible]
@[inline]
Read the complete encoded word as a natural number.
Instances For
@[instance_reducible]
@[inline]
The unique zero encoding.
Instances For
@[inline]
The unique Not-a-Real encoding, 100...0.
Instances For
@[simp]
The unique NaR value encodes as the word containing only the sign bit.
@[inline]
Whether this is the unique zero code.
Instances For
@[inline]
Whether this is the unique Not-a-Real code.