Source context

Program Rust

default

This Rust is the input prepared for Aeneas. Modeling choices explains the adaptations from the production source.

101     const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;102 103     /// Number of bits in the exponent.104     const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;105 106     /// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite107     /// representation.

Aeneas declaration

The Lean below was mechanically extracted by Aeneas from Rust.

@[global_simps, irreducible, trait_default]
def num.imp.traits.Float.EXP_BITS.default {Self : Type} {Clause0_Int : Type}
  (FloatInst : num.imp.traits.Float Self Clause0_Int) : Result Std.U32 := do
  let i ← FloatInst.BITS
  let i1 ← FloatInst.SIG_BITS
  let i2 ← i - i1
  i2 - 1#u32
Operations used here

Float · Program Rust

Source details
Declarationnum.imp.traits.Float.EXP_BITS.default
Filenum/imp/../../traits.rs
Lines104:4–104:58
Program versionRevised program