private static double scale(double x, int n) { if (x == 0 || x == Double.NEGATIVE_INFINITY || !(x < Double.POSITIVE_INFINITY) || n == 0)
private static double scale(double x, int n) { if (Configuration.DEBUG && abs(n) >= 2048) throw new InternalError("Assertion failure"); if (x == 0 || x == Double.NEGATIVE_INFINITY || ! (x < Double.POSITIVE_INFINITY) || n == 0)
	private static double scale(double x, int n) {		if (x == 0 || x == Double.NEGATIVE_INFINITY || !(x < Double.POSITIVE_INFINITY) || n == 0)			return x;		long bits = Double.doubleToLongBits(x);		int exp = (int) (bits >> 52) & 0x7ff;		if (exp == 0) // Subnormal x.			{			x *= TWO_54;			exp = ((int) (Double.doubleToLongBits(x) >> 52) & 0x7ff) - 54;		}		exp += n;		if (exp > 0x7fe) // Overflow.			return Double.POSITIVE_INFINITY * x;		if (exp > 0) // Normal.			return Double.longBitsToDouble((bits & 0x800fffffffffffffL) | ((long) exp << 52));		if (exp <= -54)			return 0 * x; // Underflow.		exp += 54; // Subnormal result.		x = Double.longBitsToDouble((bits & 0x800fffffffffffffL) | ((long) exp << 52));		return x * (1 / TWO_54);	}