TS-Scribe - v0.6.2
    Preparing search index...

    Function smallestCommonMultiple

    • 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.

      smallestCommonMultiple(4, 5, 6); // Returns 60
      smallestCommonMultiple(3, 7, 9); // Returns 63
      smallestCommonMultiple(12, 15, 20); // Returns 60