cast::revm::interpreter::primitives::alloy_primitives::ruint::algorithms::div

Function div_2x1_mg10

pub fn div_2x1_mg10(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.