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.

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

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
Lines190:16–193:17
Program versionOriginal program