Source context

Program Rust

MUL1

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

17 /// int", available here: <https://johnnylee-sde.github.io/Fast-numeric-string-to-int/>.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 bits

Aeneas declaration

The Lean below was mechanically extracted by Aeneas from Rust.

@[global_simps, irreducible]
def num.imp.dec2flt.parse.parse_8digits.MUL1 : Std.U64 := 4294967296000100#u64
Source details
Declarationnum.imp.dec2flt.parse.parse_8digits.MUL1
Filenum/imp/../../dec2flt/parse.rs
Lines20:4–20:44
Program versionOriginal program