Source context

Program Rust

from_u64_bits

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

217 #[cfg(target_has_reliable_f16)]218 impl FloatExt for f16 {219     #[inline]220     fn from_u64_bits(v: u64) -> Self {221         Self::from_bits((v & 0xFFFF) as u16)222     }223 224     // Specializing the upstream default removes only unsupported associated-225     // integer operator resolution; these are the same bit operations with

Aeneas declaration

The Lean below was mechanically extracted by Aeneas from Rust.

def F16.Insts.Dec2flt_modelNumImpTraitsFloatExtU16.from_u64_bits
  (v : Std.U64) : Result F16 := do
  let i ← lift (v &&& 65535#u64)
  let i1 ← lift (UScalar.cast .U16 i)
  core.f16.F16.from_bits i1
Operations used here

from_bits · Rust library

Source details
DeclarationF16.Insts.Dec2flt_modelNumImpTraitsFloatExtU16.from_u64_bits
Filenum/imp/../../traits.rs
Lines220:4–222:5
Program versionPreparation 1