public static BigDecimal divideRoundToFixedDecimalPlaces(
            BigInteger x,
            BigInteger y,
            int decimalPlaces,
            RoundingMode a_RoundingMode) {
        // Deal with special cases
        if (x.compareTo(BigInteger.ZERO) == 0) {
            return BigDecimal.ZERO;
        }
        if (y.compareTo(BigInteger.ZERO) == 0) {
            throw new ArithmeticException("Attempted division by zero...");
        }
        if (y.compareTo(BigInteger.ONE) == 0) {
            return roundToAndSetDecimalPlaces(
                    new BigDecimal(x), decimalPlaces, a_RoundingMode);
        }
        if (x.compareTo(y) == 0) {
            return BigDecimal.ONE.setScale(decimalPlaces);
        }
        BigDecimal result = divideNoCaseCheckRoundIfNecessary(
                new BigDecimal(x),
                new BigDecimal(y),
                decimalPlaces,
                a_RoundingMode);
        return roundToAndSetDecimalPlaces(
                result, decimalPlaces, a_RoundingMode);
    }