Natural exponential and logarithm for posits #
Each operation compares its exact mathematical result with the posit rounding boundaries.
Adaptive rational enclosures resolve the comparisons, with termination proved in the
format-independent numerics layer. No intermediate posit rounding occurs in expMinus1
or logPlus1.
The operation and domain rules follow the Posit Standard (2022), §§5.1 and 5.5.
def
FloatLib.Floats.Formats.Posit.Model.Elementary.expRat
(format : Format)
(argument offset : ℚ)
:
Model format
Round the exponential of a rational, optionally subtracting an exact offset first.
Instances For
def
FloatLib.Floats.Formats.Posit.Model.Elementary.logRat
(format : Format)
(argument : ℚ)
:
Model format
Round the natural logarithm of a positive rational; reject other arguments.
Instances For
Correctly rounded natural exponential. NaR propagates.
Instances For
Correctly rounded natural logarithm. Nonpositive inputs and NaR produce NaR.