fn calculate_shift(a: u64, b: u64) -> u32
Compute a ‘shift’ value such that (a * b) >> shift will be contained inside 64 bits.
(a * b) >> shift