Source context

Program Rust

right_shift_loop0_loop0

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

188                 // no intervening operation and preserves the unchanged value.189                 all_zero = true;190             } else {191                 while (n >> shift) == 0 {192                     n *= 10;193                     read_index += 1;194                 }195                 break;196             }197         }

Aeneas declaration

The Lean below was mechanically extracted by Aeneas from Rust.

@[rust_loop]
def num.imp.dec2flt.decimal_seq.DecimalSeq.right_shift_loop0_loop0
  (shift : Std.Usize) (read_index : Std.Usize) (n : Std.U64) :
  Result (Std.Usize × Std.U64)
  := do
  loop
    (fun (read_index1, n1) =>
      num.imp.dec2flt.decimal_seq.DecimalSeq.right_shift_loop0_loop0.body shift
      read_index1 n1)
    (read_index, n)
Operations used here

body · Program Rust

Other extracted objects at this span

num.imp.dec2flt.decimal_seq.DecimalSeq.right_shift_loop0_loop0.body

Source details
Declarationnum.imp.dec2flt.decimal_seq.DecimalSeq.right_shift_loop0_loop0
Filenum/imp/../../dec2flt/decimal_seq.rs
Lines191:16–194:17
Program versionRevised program