The LCM function will treat negative numbers as their absolute values and calculate the LCM as usual.