Source context

Program Rust

Decimal

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

29 // implementation leaves all fields, computational derives, and parser30 // operations unchanged independently of GOAL truth.31 #[derive(Clone, Copy, Default, PartialEq, Eq)]32 pub struct Decimal {33     pub exponent: i64,34     pub mantissa: u64,35     pub negative: bool,36     pub many_digits: bool,37 }38 39 impl Decimal {40     /// Detect if the float can be accurately reconstructed from native floats.

Aeneas declaration

The Lean below was mechanically extracted by Aeneas from Rust.

structure num.imp.dec2flt.decimal.Decimal where
  exponent : Std.I64
  mantissa : Std.U64
  negative : Bool
  many_digits : Bool
Source details
Declarationnum.imp.dec2flt.decimal.Decimal
Filenum/imp/../../dec2flt/decimal.rs
Lines32:0–37:1
Program versionOriginal program