* @param x
     * @param result0
     * @param root_BigInteger
     * @param epsilon_BigDecimal
     * @param maxite
     * @param decimalPlaces
     * @param a_RoundingMode
     * @return Re-approximation of result0 using Newton Raphson method
     */
    private static BigDecimal newtonRaphson0(
            BigDecimal x,
            BigDecimal result0,
            BigInteger root_BigInteger,
            BigDecimal epsilon_BigDecimal,
            int maxite,
            int decimalPlaces,
            RoundingMode a_RoundingMode) {
        BigDecimal result = new BigDecimal(result0.toString());
        int safeDecimalPlaces = decimalPlaces + 5;
        BigInteger rootsubtract1_BigInteger = root_BigInteger.subtract(
                BigInteger.ONE);
        BigDecimal previousResult_BigDecimal;
        BigDecimal previousResult_BigDecimal0;
        BigDecimal resultipowroot;
        BigDecimal resultipowrootsubtract1;
        BigDecimal divisor;
        BigDecimal resultipowrootsubtractx;
        BigDecimal resultipowrootsubtractxdividedivisor;
        boolean maxiteReached = true;
        // Initialise toCompare and previousResult_BigDecimal
        previousResult_BigDecimal = new BigDecimal(result0.toString());
        previousResult_BigDecimal0 = new BigDecimal(result0.toString());
        for (int i = 0; i < maxite; i++) {
            resultipowroot = power(
                    result,
                    root_BigInteger,
                    64,
                    safeDecimalPlaces,
                    a_RoundingMode);
            resultipowrootsubtract1 = power(
                    result,
                    rootsubtract1_BigInteger,
                    64,
                    safeDecimalPlaces,
                    a_RoundingMode);
            divisor = multiplyRoundIfNecessary(
                    resultipowrootsubtract1,
                    root_BigInteger,
                    safeDecimalPlaces,
                    a_RoundingMode);
            resultipowrootsubtractx = resultipowroot.subtract(x);
            resultipowrootsubtractxdividedivisor = divideRoundIfNecessary(
                    resultipowrootsubtractx,
                    divisor,
                    safeDecimalPlaces,
                    a_RoundingMode);
            result = result.subtract(resultipowrootsubtractxdividedivisor);
            // Test for convergence
            if (previousResult_BigDecimal.subtract(result).abs().compareTo(epsilon_BigDecimal) != 1) {
                //System.out.println("Root found in iteration " + i + " out of " + maxite);
                maxiteReached = false;
                break;
            }
            previousResult_BigDecimal0 = new BigDecimal(previousResult_BigDecimal.toString());
            previousResult_BigDecimal = new BigDecimal(result.toString());
        }
        if (maxiteReached) {
            System.out.println("previousResult_BigDecimal0.subtract(result).abs() " + previousResult_BigDecimal0.subtract(result).abs());
        }
        return roundIfNecessary(result, decimalPlaces, a_RoundingMode);
    }

//    public static BigDecimal newtonRaphson(
//            BigDecimal x,
//            BigDecimal result0,
//            BigInteger rootRoundIfNecessary,
//            BigDecimal epsilon_BigDecimal,
//            int maxite,
//            int decimalPlaces,
//            RoundingMode a_RoundingMode) {
//        BigDecimal result = new BigDecimal(result0.toString());
//        int safeDecimalPlaces = decimalPlaces + 5;
//        BigInteger rootsubtract1_BigDecimal = rootRoundIfNecessary.subtract(BigInteger.ONE);
//        BigDecimal previousResult_BigDecimal;
//        BigDecimal previousResult_BigDecimal0;
//        BigDecimal resultipowroot;
//        BigDecimal resultipowrootsubtract1;
//        BigDecimal divisor;
//        BigDecimal resultipowrootsubtractx;
//        BigDecimal resultipowrootsubtractxdividedivisor;
//        boolean maxiteReached = true;
//        // Initialise toCompare and previousResult_BigDecimal
//        previousResult_BigDecimal = new BigDecimal("1");
//        previousResult_BigDecimal0 = new BigDecimal("1");
//        int i = 0;
//        while (i < maxite) {
//            resultipowroot = power(
//                    result,
//                    rootRoundIfNecessary,
//                    64,
//                    decimalPlaces,
//                    a_RoundingMode);
//            resultipowrootsubtract1 = power(
//                    result,
//                    rootsubtract1_BigDecimal,
//                    64,
//                    decimalPlaces,
//                    a_RoundingMode);
//            divisor = multiply(
//                    resultipowrootsubtract1,
//                    rootRoundIfNecessary,
//                    safeDecimalPlaces,
//                    a_RoundingMode);
//            resultipowrootsubtractx = resultipowroot.subtract(x);
//            resultipowrootsubtractxdividedivisor = divide(
//                    resultipowrootsubtractx,
//                    divisor,
//                    safeDecimalPlaces,
//                    a_RoundingMode);
//            result = result.subtract(resultipowrootsubtractxdividedivisor);
//            // Test for convergence
//            if (previousResult_BigDecimal.subtract(result).abs().compareTo(epsilon_BigDecimal) != 1) {
//                System.out.println("Root found in iteration " + i + " out of " + maxite);
//                maxiteReached = false;
//                break;
//            }
//            previousResult_BigDecimal0 = new BigDecimal(previousResult_BigDecimal.toString());
//            previousResult_BigDecimal = new BigDecimal(result.toString());
//            i++;
//        }
//        if (maxiteReached) {
//            System.out.println("previousResult_BigDecimal0.subtract(result).abs() " + previousResult_BigDecimal0.subtract(result).abs());
//        }
//        return result;
//    }