NLA-lib Explorer

Float.Model.UnpackedFloat.shift_val

Library · theorem

Shifting a natural mantissa left preserves its real value when the exponent is decreased by the same number of binary places.

Float.Model.UnpackedFloat.shift_val (m : ℕ) (e t : ℤ) (h : t ≤ e) :
  ↑(m <<< (e - t).toNat) * 2 ^ t = ↑m * 2 ^ e

Full source on GitHub

Import NLAlib.ForMathlib.Data.Float.Operations.