src/main/java/com/xdavide9/calculatorfx/CalculatorFXController.java
private BigDecimal rootExtraction(BigDecimal a, BigDecimal b) {
        a = a.setScale(15, RoundingMode.HALF_UP);
        a = BigDecimal.valueOf(Math.pow(a.doubleValue(), 1 / b.doubleValue()));
        if (a.toString().contains("."))
            a = round(a);
        log.info("Result = {}", a);
        return a;
    }
/**
     * Updates a with the bth root of a.
     * @return a
     */
Updates a with the bth root of a.
@return a
Updates a with the bth root of a . @return a
private BigDecimal rootExtraction(BigDecimal a, BigDecimal b) {
        a = a.setScale(15, RoundingMode.HALF_UP);
        a = BigDecimal.valueOf(Math.pow(a.doubleValue(), 1 / b.doubleValue()));
        if (a.toString().contains("."))
            a = round(a);
        log.info("Result = {}", a);
        return a;
    }
private BigDecimal rootExtraction ( BigDecimal a , BigDecimal b ) { a = a . setScale ( 15 , RoundingMode . HALF_UP ) ; a = BigDecimal . valueOf ( Math . pow ( a . doubleValue ( ) , 1 / b . doubleValue ( ) ) ) ; if ( a . toString ( ) . contains ( "." ) ) a = round ( a ) ; log . info ( "Result = {}" , a ) ; return a ; }
Updates a with the bth root of a.
Updates a with the bth root of a .