Navigation: Developing Apps > BINETIX® AGE™ API > The Node > Toolkits > age_math
gcd/2
Description
gcd/2 is an Erlang function exported by "age_math" module.
Calculates greatest common divisor (GCD) by Euclidean algorithm of two natural numbers N and M.
References
None
Parameters
Name
Type
N
integer()
Natural number One.
M
Natural number Two.
Result
Value or Type
Returns the value of GCD.
Code Sample
> age_math:gcd(1071, 462). 21