Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

div_mod

Function that performs modular division.

Arguments

  • a - Left hand side of division.
  • b - Right hand side of division.
  • modulo - modulo.

Returns

  • u256 - result of modular division

Fully qualified path: alexandria_math::mod_arithmetics::div_mod

pub fn div_mod(a: u256, b: u256, mod_non_zero: NonZero<u256>) -> u256