Real rounding and exceptional cases for posit two-coordinate arctangent #
The operations round the exact principal complex argument, in radians or divided by pi, including its value on the negative real axis. NaR and the origin are rejected before the comparison search.
theorem
FloatLib.Floats.Formats.Posit.Model.Trigonometric.evaluateArgument_eq_real
(prepare : ℚ → ℚ → ℕ → Numerics.Enclosure.Comparison.Prepared)
(function : ℝ → ℝ → ℝ)
(hprepare :
∀ (a b : ℚ) (levels : ℕ) (boundary : ℚ), (prepare a b levels).compare boundary = cmp (function ↑a ↑b) ↑boundary)
{format : Format}
(x y : Model format)
{a b : ℚ}
(hx : x.toRat? = some a)
(hy : y.toRat? = some b)
(horigin : ¬(a = 0 ∧ b = 0))
:
An exact two-coordinate comparator gives the standard rounding away from the origin.
@[simp]
theorem
FloatLib.Floats.Formats.Posit.Model.Trigonometric.evaluateArgument_nar_left
(prepare : ℚ → ℚ → ℕ → Numerics.Enclosure.Comparison.Prepared)
{format : Format}
(y : Model format)
:
A NaR first coordinate propagates.
@[simp]
theorem
FloatLib.Floats.Formats.Posit.Model.Trigonometric.evaluateArgument_nar_right
(prepare : ℚ → ℚ → ℕ → Numerics.Enclosure.Comparison.Prepared)
{format : Format}
(x : Model format)
:
A NaR second coordinate propagates.
@[simp]
theorem
FloatLib.Floats.Formats.Posit.Model.Trigonometric.evaluateArgument_origin
(prepare : ℚ → ℚ → ℕ → Numerics.Enclosure.Comparison.Prepared)
{format : Format}
:
The origin is outside the posit operation's domain.