method

gcdlcm

v1_8_7_72 - Show latest stable - Class: Integer
gcdlcm(other)
public

Returns the GCD and the LCM (see #gcd and #lcm) of the two arguments (self and other). This is more efficient than calculating them separately.

Example:

  6.gcdlcm 9     # -> [3, 18]