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 : BoolSource details
| Declaration | num.imp.dec2flt.decimal.Decimal |
|---|---|
| File | num/imp/../../dec2flt/decimal.rs |
| Lines | 32:0–37:1 |
| Program version | Preparation 2 |