Application Programming Interface

Functions

unsigned int arithmetic_gcd(unsigned int a, unsigned int b)

arithmetic_gcd computes the Greatest Common Divisor of two positive integers.

Note

the Greatest Common Divisor of 0 and 0 is computed as 0

Parameters:
  • a – first positive integer

  • b – second positive integer

Returns:

the Greatest Common Divisor of a and b

unsigned int arithmetic_lcm(unsigned int a, unsigned int b)

arithmetic_lcm computes the Least Common Multiple of two positive integers.

Parameters:
  • a – first positive integer

  • b – second positive integer

Returns:

the Least Common Multiple of a and b