Program Rust
default
This Rust is the input prepared for Aeneas. Modeling choices explains the adaptations from the production source.
116 const EXP_BIAS: u32 = Self::EXP_SAT >> 1;117 118 /// Minimum exponent value of normal values.119 const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);120 121 /// Round-to-even only happens for negative values of q122 /// when q ≥ −4 in the 64-bit case and when q ≥ −17 inAeneas declaration
The Lean below was mechanically extracted by Aeneas from Rust.
@[global_simps, irreducible, trait_default]
def num.imp.traits.Float.EXP_MIN.default {Self : Type} {Clause0_Int : Type}
(FloatInst : num.imp.traits.Float Self Clause0_Int) : Result Std.I32 := do
let i ← FloatInst.EXP_BIAS
let i1 ← lift (UScalar.hcast .I32 i)
let i2 ← i1 - 1#i32
-. i2Operations used here
Source details
| Declaration | num.imp.traits.Float.EXP_MIN.default |
|---|---|
| File | num/imp/../../traits.rs |
| Lines | 119:4–119:54 |
| Program version | Original program |