number_lcm — Least common multiple.
result = number_lcm ( m , n ) result = number_lcm ( m , n , method )
a 1x1 matrix of floating point integers
a 1x1 matrix of floating point integers
a 1x1 matrix of strings, the algorithm to use (default method="euclidian")
a 1x1 matrix of floating point integers, the least common multiple
Returns the least common multiple of m and n. Uses number_gcd. The values of the method variable are the same as the values in number_gcd.
// Test without options computed = number_lcm ( 4 , 6 ) // 12 computed = number_lcm ( 6 , 4 ) // 12 // Test with euclidian computed = number_lcm ( 4 , 6 , "euclidian" ) // 12 computed = number_lcm ( 6 , 4 , "euclidian" ) // 12 // With negative integers computed = number_lcm ( 4 , -6 ) // 12