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

Function reciprocal_ref

pub fn reciprocal_ref(d: u64) -> u64
Expand description

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

Requires $\mathtt{d} ≥ 2^{127}$, i.e. the highest bit of $\mathtt{d}$ must be set.