nd4j-common/src/main/java/org/nd4j/linalg/util/BigDecimalMath.java
static public int err2prec(BigDecimal x, BigDecimal xerr) {
        return err2prec(xerr.divide(x, MathContext.DECIMAL64).doubleValue());


    }
static public int err2prec(BigDecimal x, BigDecimal xerr) {
        return err2prec(xerr.divide(x, MathContext.DECIMAL64).doubleValue());


    }
Convert an absolute error to a precision.

@param x    The value of the variable
@param xerr The absolute error in the variable
@return The number of valid digits in x.
The value is rounded down, and on the pessimistic side for that reason.