Add SafeAbs and handle negative numbers in multiplication.
Fix ilogcp-test.