src/org/kocakosm/pitaya/math/Numbers.java
public static long safeAbs(long a)
	{
		if (a == Long.MIN_VALUE) {
			throw new ArithmeticException(
				"Long overflow: abs(" + a + ")");
		}
		return Math.abs(a);
	}
public static long safeAbs(long a)
	{
		if (a == Long.MIN_VALUE) {
			throw new ArithmeticException(
				"Long overflow: abs(" + a + ")");
		}
		return Math.abs(a);
	}
Returns the absolute value of the given value, provided the result
fits into a {@code long}.

@param a the value.

@return the absolute value of {@code a}.

@throws ArithmeticException if the absolute value of {@code a} can't
be represented by a {@code long}.