nd4j-common/src/main/java/org/nd4j/linalg/util/BigDecimalMath.java
static public BigDecimal multiplyRound(final BigDecimal x, final int n) {
        BigDecimal resul = x.multiply(new BigDecimal(n));
        /* The estimation of the absolute error in the result is |n*err(x)|
         */
        MathContext mc = new MathContext(n != 0 ? x.precision() : 0);


        return resul.round(mc);


    }
static public BigDecimal multiplyRound(final BigDecimal x, final int n) {
        BigDecimal resul = x.multiply(new BigDecimal(n));
        /* The estimation of the absolute error in the result is |n*err(x)|
         */
        MathContext mc = new MathContext(n != 0 ? x.precision() : 0);


        return resul.round(mc);


    }
static public BigDecimal multiplyRound ( final BigDecimal x , final int n ) { BigDecimal resul = x . multiply ( new BigDecimal ( n ) ) ; /* The estimation of the absolute error in the result is |n*err(x)|
         */ MathContext mc = new MathContext ( n != 0 ? x . precision ( ) : 0 ) ; return resul . round ( mc ) ; }
Multiply and round.

@param x The left factor.
@param n The right factor.
@return The product x*n.
Multiply and round .