Returns the integer in the same equivalence class as x that is closest to 0.
The result will be in the interval (-n/2, n/2].
Instances For
@[simp]
@[simp]
@[simp]
theorem
ZMod.valMinAbs_natCast_of_half_lt
{n a : ℕ}
(ha : n / 2 < a)
(ha' : a < n)
:
(↑a).valMinAbs = ↑a - ↑n
@[simp]