Program Rust
default
This Rust is the input prepared for Aeneas. Modeling choices explains the adaptations from the production source.
107 /// representation.108 ///109 /// This shifted fully right, use `EXP_MASK` for the shifted value.110 const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;111 112 /// Signed version of `EXP_SAT` since we convert a lot.113 const INFINITE_POWER: i32 = Self::EXP_SAT as i32;Aeneas declaration
The Lean below was mechanically extracted by Aeneas from Rust.
@[global_simps, irreducible, trait_default]
def num.imp.traits.Float.EXP_SAT.default {Self : Type} {Clause0_Int : Type}
(FloatInst : num.imp.traits.Float Self Clause0_Int) : Result Std.U32 := do
let i ← FloatInst.EXP_BITS
let i1 ← 1#u32 <<< i
i1 - 1#u32Operations used here
Source details
| Declaration | num.imp.traits.Float.EXP_SAT.default |
|---|---|
| File | num/imp/../../traits.rs |
| Lines | 110:4–110:51 |
| Program version | Revised program |