* @param y 0 < y < 1
     * @param decimalPlaces
     * @param a_RoundingMode
     * @return x^y accurate to at least decimalPlaces
     */
    private static BigDecimal powerExponentLessThanOne(
            BigDecimal x,
            BigDecimal y,
            int decimalPlaces,
            RoundingMode a_RoundingMode) {
        BigDecimal result;
        //BigDecimal epsilon_BigDecimal = new BigDecimal(BigInteger.ONE, decimalPlaces);
        BigDecimal y0 = new BigDecimal(y.toString());
        BigDecimal element;
        BigInteger elementUnscaled;
        BigDecimal elementOne;
        BigInteger elementOneReciprocal;
        BigDecimal root;
        BigDecimal rootMultiple;
        int maxite = y0.precision();
        result = BigDecimal.ONE;
        for (int i = 0; i < maxite; i++) {
            element = floorSignificantDigit(y0);
            elementUnscaled = element.unscaledValue();
            //System.out.println("element " + element + " elementUnscaled " + elementUnscaled);
            if (elementUnscaled.compareTo(BigInteger.ZERO) == 1) {
                elementOne = divideRoundIfNecessary(
                        element,
                        elementUnscaled,
                        decimalPlaces,
                        a_RoundingMode);
                if (elementOne.compareTo(BigDecimal.ZERO) == 0) {
                    break;
                }
                //System.out.println("element " + element + " elementUnscaled " + elementUnscaled);
                elementOneReciprocal = reciprocalWillBeIntegerReturnBigInteger(elementOne);
                root = rootRoundIfNecessary(
                        x,
                        elementOneReciprocal,
                        decimalPlaces + 3,
                        a_RoundingMode);
                if (root.compareTo(BigDecimal.ZERO) == 1) {
                    rootMultiple = power(
                            root,
                            elementUnscaled,
                            64,
                            decimalPlaces,
                            a_RoundingMode);
                    result = multiplyRoundIfNecessary(
                            result,
                            rootMultiple,
                            decimalPlaces,
                            a_RoundingMode);
                }
            }
            y0 = y0.subtract(element);
        }
//        BigDecimal result;
//        BigDecimal epsilon_BigDecimal = new BigDecimal(BigInteger.ONE, decimalPlaces);
//        BigDecimal x0 = new BigDecimal(x.toString());
//        BigDecimal element;
//        BigInteger elementUnscaled;
//        BigDecimal elementOne;
//        BigInteger elementOneReciprocal;
//        BigDecimal rootRoundIfNecessary;
//        BigDecimal rootMultiple;
//        //int maxite = x0.precision();
//        result = BigDecimal.ONE;
//        //for (int i = 0; i < maxite; i++) {
//        while (true) {
//            element = floorSignificantDigit(x0);
//            elementUnscaled = element.unscaledValue();
//            //System.out.println("element " + element + " elementUnscaled " + elementUnscaled);
//            if (elementUnscaled.compareTo(BigInteger.ZERO) == 1) {
//                elementOne = divide(
//                        element,
//                        elementUnscaled,
//                        decimalPlaces,
//                        a_RoundingMode);
//                if (elementOne.compareTo(BigDecimal.ZERO) == 0) {
//                    break;
//                }
//                //System.out.println("element " + element + " elementUnscaled " + elementUnscaled);
//                elementOneReciprocal = reciprocalWillBeIntegerReturnBigInteger(elementOne);
//                rootRoundIfNecessary = rootRoundIfNecessary(
//                        x,
//                        elementOneReciprocal,
//                        //a_Generic_BigDecimal,
//                        decimalPlaces,
//                        a_RoundingMode);
//                if (rootRoundIfNecessary.compareTo(BigDecimal.ZERO) == 1) {
//                    rootMultiple = power(
//                            rootRoundIfNecessary,
//                            elementUnscaled,
//                            64,
//                            decimalPlaces,
//                            a_RoundingMode);
//                    result = multiply(
//                            result,
//                            rootMultiple,
//                            decimalPlaces,
//                            a_RoundingMode);
//            }
//            x0 = x0.subtract(element);
//        }

//        BigDecimal xPowerEleven = power(
//                x,
//                ELEVEN,
//                a_Generic_BigDecimal,
//                decimalPlaces * decimalPlaces, // guess at precision required
//                a_RoundingMode);
//        BigDecimal elevenSubtractY = ELEVEN.subtract(y);
//        BigDecimal xPowerElevenSubtractY = power(
//                x,
//                elevenSubtractY,
//                a_Generic_BigDecimal,
//                decimalPlaces,
//                a_RoundingMode);
//        result = divide(
//                xPowerEleven,
//                xPowerElevenSubtractY,
//                decimalPlaces,
//                a_RoundingMode);
//        return result;
//        // If x.unscaledValue() == 1, then the numerator becomes one.
//        // If x.unscaledValue() == 2, then the numerator tends to 1,
//        // but to calculate Euler's constant raised to the power of (the Euler
//        // based log of x.unscaledValue() multiplied by y) we are dealing with
//        // an exponentiation involving a power even smaller than y which is
//        // problematic.
//        // If x.unscaledValue() >= 3, then any further exponentiations will
//        // involve a power greater than y.
//        // For this reason, numerator and denominator are effectively mutlipled
//        // by 10.
//        BigDecimal numeratorx = new BigDecimal(x.unscaledValue().multiply(BigInteger.TEN));
//        BigDecimal denominatorx = new BigDecimal(BigInteger.TEN, -x.scale());
//        BigDecimal numeratorexponent = y.multiply(log(
//                10,
//                numeratorx,
//                decimalPlaces, // not sure about this or the multiplication
//                a_RoundingMode));
//        BigDecimal denominatorexponent = y.multiply(log(
//                10,
//                denominatorx,
//                decimalPlaces, // not sure about this
//                a_RoundingMode));
//        BigDecimal numerator = power(
//                BigDecimal.TEN,
//                numeratorexponent,
//                a_Generic_BigDecimal,
//                decimalPlaces, // not sure about this
//                a_RoundingMode);
//        BigDecimal denominator = power(
//                BigDecimal.TEN,
//                denominatorexponent,
//                a_Generic_BigDecimal,
//                decimalPlaces, // not sure about this
//                a_RoundingMode);
//        result = divideNoCaseCheckNoRounding(
//                numerator,
//                denominator,
//                decimalPlaces,
//                a_RoundingMode);
//        return result;
        //ln(x, a_Generic_BigDecimal, decimalPlaces, a_RoundingMode)
        //power(numerator,y,a_Generic_BigDecimal, decimalPlaces, a_RoundingMode)
//        BigDecimal epsilon_BigDecimal = new BigDecimal(BigInteger.ONE, decimalPlaces);
//        if (y1.compareTo(epsilon_BigDecimal) == -1) {
//            return new BigDecimal(BigInteger.ZERO, decimalPlaces);
//        }


//    if (x.compareTo (BigDecimal.ONE) 
//        == -1 && x.compareTo(BigDecimal.ONE.negate()) == 1) {
//
//            BigDecimal yunscaled = new BigDecimal(y.unscaledValue());
//        int yscale = y.scale();
//        int xscale = x.scale();
//        BigInteger rootRoundIfNecessary = new BigDecimal(BigInteger.ONE, (-1 * yscale)).toBigIntegerExact();
//        int rootLength = rootRoundIfNecessary.toString().length();
//
////            BigDecimal xrooted = rootRoundIfNecessary(
////                    x,
////                    rootRoundIfNecessary,
////                    a_Generic_BigDecimal,
////                    decimalPlaces,
////                    a_RoundingMode);
////            result = power(
////                    xrooted,
////                    yunscaled,
////                    a_Generic_BigDecimal,
////                    decimalPlaces + xscale,
////                    a_RoundingMode);
//        BigDecimal xpowyunscaled = power(
//                x,
//                yunscaled,
//                //a_Generic_BigDecimal,
//                //decimalPlaces + xscale, // Need much more precision....
//                decimalPlaces + yunscaled.intValueExact() + xscale,
//                a_RoundingMode);
//        //BigDecimal initialEstimate = BigDecimal.ONE.add(x).divide(TWO);
//        result = rootLessThanOne(
//                xpowyunscaled,
//                rootRoundIfNecessary,
//                //initialEstimate,
//                //a_Generic_BigDecimal,
//                decimalPlaces,
//                a_RoundingMode);
//        return result;
//    }
//    
//
//    
//        else {
//            decimalPlaces += 3;
//        BigDecimal y0 = new BigDecimal(y.toString());
//        int maxite = y0.precision();
//        BigDecimal element;
//        BigInteger elementUnscaled;
//        BigDecimal elementOne;
//        BigInteger elementOneReciprocal;
//        BigDecimal rootRoundIfNecessary;
//        BigDecimal rootMultiple;
//        result = BigDecimal.ONE;
//        for (int i = 0; i < maxite; i++) {
//            element = floorSignificantDigit(y0);
//            //elementUnscaled = new BigDecimal(element.unscaledValue());
//            elementUnscaled = element.unscaledValue();
//            if (elementUnscaled.compareTo(BigInteger.ZERO) == 1) {
//                elementOne = divide(
//                        element,
//                        elementUnscaled,
//                        decimalPlaces,
//                        a_RoundingMode);
//                elementOneReciprocal = reciprocalWillBeIntegerReturnBigInteger(elementOne);
//                rootRoundIfNecessary = rootRoundIfNecessary(
//                        x,
//                        elementOneReciprocal,
//                        //a_Generic_BigDecimal,
//                        decimalPlaces,
//                        a_RoundingMode);
//                if (rootRoundIfNecessary.compareTo(BigDecimal.ZERO) == 1) {
//                    rootMultiple = power(
//                            rootRoundIfNecessary,
//                            elementUnscaled,
//                            64,
//                            decimalPlaces,
//                            a_RoundingMode);
//                    result = multiply(
//                            result,
//                            rootMultiple,
//                            decimalPlaces,
//                            a_RoundingMode);
//                }
//            }
//            y0 = y0.subtract(element);
//        }
//        return round(result, decimalPlaces - 3, a_RoundingMode);
//    }
//    //return round(result, decimalPlaces, a_RoundingMode);
//}