From WikiChip
$lcm identifier - mIRC
< mirc‎ | identifiers
Revision as of 09:32, 31 October 2022 by Maroonbells (talk | contribs) (Created page with "{{mirc title|$lcm identifier}}'''$lcm''' returns the Least Common Multiple for 2 or more integers. == Details == The Least Common Multiple is the smallest positive integer th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

Details

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

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

Parameters

  • N - Integers

Properties

None

Example

//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

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