Source context

Program Rust

default

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

108     const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;109 110     /// Signed version of `EXP_SAT` since we convert a lot.111     const INFINITE_POWER: i32 = Self::EXP_SAT as i32;112 113     /// The exponent bias value. This is also the maximum value of the exponent.114     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

Float · Program Rust

Source details
Declarationnum.imp.traits.Float.INFINITE_POWER.default
Filenum/imp/../../traits.rs
Lines111:4–111:53
Program versionPreparation 1