Source context

Program Rust

from_u64_bits

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

270 271 impl FloatExt for f32 {272     #[inline]273     fn from_u64_bits(v: u64) -> Self {274         f32::from_bits((v & 0xFFFFFFFF) as u32)275     }276 277     // This is the upstream default after substituting `Self::Int = u32`;278     // concreteness is needed only because Charon cannot resolve the generic

Aeneas declaration

The Lean below was mechanically extracted by Aeneas from Rust.

def F32.Insts.Dec2flt_modelNumImpTraitsFloatExtU32.from_u64_bits
  (v : Std.U64) : Result F32 := do
  let i ← lift (v &&& 4294967295#u64)
  let i1 ← lift (UScalar.cast .U32 i)
  core.f32.F32.from_bits i1
Operations used here

from_bits · Rust library

Source details
DeclarationF32.Insts.Dec2flt_modelNumImpTraitsFloatExtU32.from_u64_bits
Filenum/imp/../../traits.rs
Lines273:4–275:5
Program versionPreparation 1