Source context

Program Rust

NEG_NAN

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

192     // `from_bits` produces exactly the bit pattern obtained by negating the193     // upstream canonical NaN.  This avoids Aeneas's unsupported float unop194     // while preserving the constant, including its sign and payload bits.195     const NEG_NAN: Self = f16::from_bits(0xFE00);196 197     const BITS: u32 = 16;198     const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;

Aeneas declaration

The Lean below was mechanically extracted by Aeneas from Rust.

@[global_simps, irreducible]
def F16.Insts.Dec2flt_modelNumImpTraitsFloatU16.NEG_NAN : Result F16 :=
  core.f16.F16.from_bits 65024#u16
Operations used here

from_bits · Rust library

Source details
DeclarationF16.Insts.Dec2flt_modelNumImpTraitsFloatU16.NEG_NAN
Filenum/imp/../../traits.rs
Lines195:4–195:49
Program versionPreparation 1