Function revm::primitives::alloy_primitives::ruint::algorithms::div::div_2x1

source ·
pub fn div_2x1(u: u128, d: u64, v: u64) -> (u64, u64)
Expand description

⚠️ Computes the quotient and remainder of a u128 divided by a u64.

Requires

  • u < d * 2**64,
  • d >= 2**63, and
  • v = reciprocal(d).

Implements algorithm 4 from MG10.