Greatest Common Divider
The Greatest Common Divisor (GCD) function is useful for simplifying fractions with rational numbers. Specifically in machine learning, GCD can be used in algorithms for computing tensor factorizations and matrix decompositions. GCD(a, b)
is the largest positive integer that divides both a
and b
without a remainder.
To implement the GCD
function, see the method signature below. Note, a
is an unsigned integer, thus non-negative numbers are required.
Under the hood, the following functions are utilized directly in the Neural client.
Last updated