Source context

Program Rust

DecimalSeq

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

19 // implementation preserves the representation, Clone/PartialEq behavior, and20 // every fallback operation independently of GOAL truth.21 #[derive(Clone, PartialEq)]22 pub struct DecimalSeq {23     /// The number of significant digits in the decimal.24     pub num_digits: usize,25     /// The offset of the decimal point in the significant digits.26     pub decimal_point: i32,27     /// If the number of significant digits stored in the decimal is truncated.28     pub truncated: bool,29     /// Buffer of the raw digits, in the range [0, 9].30     pub digits: [u8; Self::MAX_DIGITS],31 }32 33 impl Default for DecimalSeq {34     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#usize
Source details
Declarationnum.imp.dec2flt.decimal_seq.DecimalSeq
Filenum/imp/../../dec2flt/decimal_seq.rs
Lines22:0–31:1
Program versionRevised program