Correct rounding of natural posit elementary functions #
The real-rounding theorems cover every finite input in the function's domain, including extreme magnitudes, exact zero results, and the standard nonzero saturation rule. Separate theorems record NaR propagation and invalid logarithm domains.
theorem
FloatLib.Floats.Formats.Posit.Model.Elementary.expRat_eq_real
(format : Format)
(argument offset : ℚ)
:
Exact exponential evaluation and output subtraction share one final rounding.
theorem
FloatLib.Floats.Formats.Posit.Model.Elementary.logRat_eq_real
(format : Format)
(argument : ℚ)
(hpositive : 0 < argument)
:
A positive rational logarithm argument is rounded according to its exact real value.