Calculates the smallest common multiple (SCM) of multiple numbers.
The function iteratively finds the SCM of the provided values using the relationship
between the greatest common divisor (GCD) and SCM.
The formula used is: SCM(a, b) = |a * b| / GCD(a, b).
Parameters
...values: number[]
A list of numbers to find the SCM of.
Returns number
The smallest common multiple of the provided numbers.
Calculates the smallest common multiple (SCM) of multiple numbers. The function iteratively finds the SCM of the provided values using the relationship between the greatest common divisor (GCD) and SCM. The formula used is:
SCM(a, b) = |a * b| / GCD(a, b).