Source context

Program Rust

MUL2

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

18 fn parse_8digits(mut v: u64) -> u64 {19     const MASK: u64 = 0x0000_00FF_0000_00FF;20     const MUL1: u64 = 0x000F_4240_0000_0064;21     const MUL2: u64 = 0x0000_2710_0000_0001;22     v -= 0x3030_3030_3030_3030;23     v = (v * 10) + (v >> 8); // will not overflow, fits in 63 bits24     let v1 = (v & MASK).wrapping_mul(MUL1);

Aeneas declaration

The Lean below was mechanically extracted by Aeneas from Rust.

@[global_simps, irreducible]
def num.imp.dec2flt.parse.parse_8digits.MUL2 : Std.U64 := 42949672960001#u64
Source details
Declarationnum.imp.dec2flt.parse.parse_8digits.MUL2
Filenum/imp/../../dec2flt/parse.rs
Lines21:4–21:44
Program versionOriginal program