From WikiChip
$lcm identifier - mIRC
< mirc‎ | identifiers

$lcm returns the Least Common Multiple for 2 or more integers.

Details[edit]

The Least Common Multiple is the smallest positive integer that is divisible by each non-zero input number. For 2 non-zero numbers, the LCM is the absolute value of their product divided by their $gcd

Synopsis[edit]

$lcm(N1,N2[,N3]...)

Parameters[edit]

  • N - Integers

Properties[edit]

None

Example[edit]

//echo -a the smallest number divisible by each of 35 49 and 75 is $lcm(35,49,75)
//echo -a the lcm of 35 and 25 is $calc( $abs($calc(35*25)) / $gcd(35,25) )

Compatibility[edit]

Added: mIRC v7.72
Added on: 27 Nov 2022
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See also[edit]