Correct rounding of base-two and base-ten posit logarithms #
The inverse relation between logarithm and exponentiation transfers every exact boundary comparison to the rational-power kernel. The resulting theorem includes rational logarithms, irrational logarithms, exact ties, signed saturation, and invalid argument domains.
theorem
FloatLib.Floats.Formats.Posit.Model.Logarithm.compareTarget_eq_real
(base argument candidate : ℚ)
(degree : ℕ)
(hbase : 1 < base)
(hargument : 0 < argument)
:
Inverse power comparisons have exactly the real-logarithm ordering.
theorem
FloatLib.Floats.Formats.Posit.Model.Logarithm.roundRat_eq_real
(format : Format)
(base argument : ℚ)
(hbase : 1 < base)
(hargument : 0 < argument)
:
A positive rational argument is rounded according to its exact signed real logarithm.
@[simp]
Base-ten Plus1 propagates NaR.