Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

gcd_two_numbers

Internal function to calculate the gcd between two numbers

Arguments

  • a - The first number for which to calculate the gcd
  • b - The first number for which to calculate the gcd

Returns

  • felt252 - The gcd of a and b

Fully qualified path: alexandria_math::gcd_of_n_numbers::gcd_two_numbers

pub fn gcd_two_numbers(mut a: u128, mut b: u128) -> u128