* @param y
     * @param decimalPlaces
     * @param a_RoundingMode
     * @return x/y then rounded;
     */
    public static BigDecimal divideRoundToFixedDecimalPlaces(
            BigDecimal x,
            BigInteger y,
            int decimalPlaces,
            RoundingMode a_RoundingMode) {
        // Deal with special cases
        if (x.compareTo(BigDecimal.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(x, decimalPlaces, a_RoundingMode);
        }
        BigDecimal y_BigDecimal = new BigDecimal(y);
        if (x.compareTo(y_BigDecimal) == 0) {
            return BigDecimal.ONE.setScale(decimalPlaces);
        }
        BigDecimal result = divideNoCaseCheckRoundIfNecessary(
                x,
                y_BigDecimal,
                decimalPlaces,
                a_RoundingMode);
        return roundToAndSetDecimalPlaces(
                result, decimalPlaces, a_RoundingMode);
    }