nd4j-common/src/main/java/org/nd4j/linalg/util/BigDecimalMath.java
static public BigDecimal divideRound(final BigDecimal x, final BigDecimal y) {
        /* The estimation of the relative error in the result is |err(y)/y|+|err(x)/x|
         */
        MathContext mc = new MathContext(Math.min(x.precision(), y.precision()));


        return x.divide(y, mc);


    }
static public BigDecimal divideRound(final BigDecimal x, final BigDecimal y) {
        /* The estimation of the relative error in the result is |err(y)/y|+|err(x)/x|
         */
        MathContext mc = new MathContext(Math.min(x.precision(), y.precision()));


        return x.divide(y, mc);


    }
static public BigDecimal divideRound ( final BigDecimal x , final BigDecimal y ) { /* The estimation of the relative error in the result is |err(y)/y|+|err(x)/x|
         */ MathContext mc = new MathContext ( Math . min ( x . precision ( ) , y . precision ( ) ) ) ; return x . divide ( y , mc ) ; }
Divide and round.

@param x The numerator
@param y The denominator
@return the divided x/y
Divide and round .