Program Rust
DecimalSeq
This Rust is the input prepared for Aeneas. Modeling choices explains the adaptations from the production source.
18 // implementation preserves the representation, Clone/PartialEq behavior, and19 // every fallback operation independently of GOAL truth.20 #[derive(Clone, PartialEq)]21 pub struct DecimalSeq {22 /// The number of significant digits in the decimal.23 pub num_digits: usize,24 /// The offset of the decimal point in the significant digits.25 pub decimal_point: i32,26 /// If the number of significant digits stored in the decimal is truncated.27 pub truncated: bool,28 /// Buffer of the raw digits, in the range [0, 9].29 pub digits: [u8; Self::MAX_DIGITS],30 }31 32 impl Default for DecimalSeq {33 fn default() -> Self {Aeneas declaration
The Lean below was mechanically extracted by Aeneas from Rust.
structure num.imp.dec2flt.decimal_seq.DecimalSeq where
num_digits : Std.Usize
decimal_point : Std.I32
truncated : Bool
digits : Array Std.U8 768#usizeSource details
| Declaration | num.imp.dec2flt.decimal_seq.DecimalSeq |
|---|---|
| File | num/imp/../../dec2flt/decimal_seq.rs |
| Lines | 21:0–30:1 |
| Program version | Original program |