Program Rust
default
This Rust is the input prepared for Aeneas. Modeling choices explains the adaptations from the production source.
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;114 115 /// The exponent bias value. This is also the maximum value of the exponent.116 const EXP_BIAS: u32 = Self::EXP_SAT >> 1;Aeneas declaration
The Lean below was mechanically extracted by Aeneas from Rust.
@[global_simps, irreducible, trait_default]
def num.imp.traits.Float.INFINITE_POWER.default {Self : Type} {Clause0_Int :
Type} (FloatInst : num.imp.traits.Float Self Clause0_Int)
: Result Std.I32 := do
let i ← FloatInst.EXP_SAT
ok (UScalar.hcast .I32 i)Operations used here
Source details
| Declaration | num.imp.traits.Float.INFINITE_POWER.default |
|---|---|
| File | num/imp/../../traits.rs |
| Lines | 113:4–113:53 |
| Program version | Original program |