Documentation

Interval.Floating.TwoPow

Floating point powers of two #

Exact powers of two #

theorem Floating.valid_two_pow {n : Fixed 0} :
have s := n.n.toUInt64 + 2 ^ 63; Valid (2 ^ 62) (s - 62)

two_pow is valid

@[irreducible]

Exact powers of two

Equations
Instances For
    theorem Floating.approx_two_pow (n : Fixed 0) :
    approx (two_pow n) (2 ^ n.val)

    two_pow is conservative

    The special case of n = 2^62 #

    @[irreducible]

    Build 2^62 * 2^(s - 2^63)

    Instances For
      @[simp]
      theorem Floating.val_two_pow_special (s : UInt64) :
      (two_pow_special s).val = 2 ^ (62 + s.toNat - 2 ^ 63)

      two_pow_special never makes nan