<div dir="ltr"><div>Integer>>lcm: was defined in such a way that it could return negative numbers. Also '0 lcm: 0' produced division by zero.</div><div><br></div><div>The least common multiple is unique "up to units", so to make it unique you have to do a consistent choice of associate (negative or positive). For integers it is customary to define LCM(a,b) to be 0 if a=0 or b=0, and strictly positive otherwise. This is how it is defined in Magma, GAP and GMP, etc, and this change set fixes Integer>>lcm: to behave like that.<br></div><div><br></div><div>I also attach some tests for Integer>>gcd: and Integer>>lcm:.</div><div><br></div></div>