xen-dev-utils
    Preparing search index...

    Function lcm

    • Least common multiple of two integers.

      Return zero if either of the arguments is zero.

      Satisfies a * b = gcd * lcm. See gcd for consequences on negative inputs.

      Parameters

      • a: number

        The first integer.

      • b: number

        The second integer.

      Returns number

      The smallest integer that both a and b divide.

    • Least common multiple of two integers.

      Return zero if either of the arguments is zero.

      Satisfies a * b = gcd * lcm. See gcd for consequences on negative inputs.

      Parameters

      • a: bigint

        The first integer.

      • b: bigint

        The second integer.

      Returns bigint

      The smallest integer that both a and b divide.