src/main/java/com/xdavide9/calculatorfx/CalculatorFXController.java
private BigDecimal exponentiation(BigDecimal a, BigDecimal b) {
        a = a.setScale(15, RoundingMode.HALF_UP);
        a = BigDecimal.valueOf(Math.pow(a.doubleValue(), b.doubleValue()));
        if (a.toString().contains("."))
            a = round(a);
        System.out.println("Result: " + a);
        return a;
    }
/**
     * Updates a with the power of a and b.
     * @return a
     */
Updates a with the power of a and b.
@return a
Updates a with the power of a and b . @return a
private BigDecimal exponentiation(BigDecimal a, BigDecimal b) {
        a = a.setScale(15, RoundingMode.HALF_UP);
        a = BigDecimal.valueOf(Math.pow(a.doubleValue(), b.doubleValue()));
        if (a.toString().contains("."))
            a = round(a);
        System.out.println("Result: " + a);
        return a;
    }
private BigDecimal exponentiation ( BigDecimal a , BigDecimal b ) { a = a . setScale ( 15 , RoundingMode . HALF_UP ) ; a = BigDecimal . valueOf ( Math . pow ( a . doubleValue ( ) , b . doubleValue ( ) ) ) ; if ( a . toString ( ) . contains ( "." ) ) a = round ( a ) ; System . out . println ( "Result: " + a ) ; return a ; }
Updates a with the power of a and b.
Updates a with the power of a and b .