Program Rust
default
This Rust is the input prepared for Aeneas. Modeling choices explains the adaptations from the production source.
99 const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;100 101 /// Number of bits in the exponent.102 const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;103 104 /// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite105 /// 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#u32Operations used here
Source details
| Declaration | num.imp.traits.Float.EXP_BITS.default |
|---|---|
| File | num/imp/../../traits.rs |
| Lines | 102:4–102:58 |
| Program version | Preparation 1 |