reth_revm::interpreter::primitives::alloy_primitives::ruint::algorithms::div

Function reciprocal_2_mg10

pub fn reciprocal_2_mg10(d: u128) -> u64
Expand description

⚠️ Computes $\floor{\frac{2^{192} - 1}{\mathsf{d}}} - 2^{64}$.

Requires $\mathsf{d} ∈ [2^{127}, 2^{128})$, i.e. the most significant bit of $\mathsf{d}$ must be set.

Implements MG10 algorithm 6.