nd4j-common/src/main/java/org/nd4j/linalg/util/BigDecimalMath.java
static public BigDecimal exp(final MathContext mc) {
        /* look it up if possible */
        if (mc.getPrecision() < E.precision()) {
            return E.round(mc);
        } else {
            /* Instantiate a 1.0 with the requested pseudo-accuracy
             * and delegate the computation to the public method above.
             */
            BigDecimal uni = scalePrec(BigDecimal.ONE, mc.getPrecision());
            return exp(uni);
        }
    }
static public BigDecimal exp(final MathContext mc) {
        /* look it up if possible */
        if (mc.getPrecision() < E.precision()) {
            return E.round(mc);
        } else {
            /* Instantiate a 1.0 with the requested pseudo-accuracy
             * and delegate the computation to the public method above.
             */
            BigDecimal uni = scalePrec(BigDecimal.ONE, mc.getPrecision());
            return exp(uni);
        }
    }
static public BigDecimal exp ( final MathContext mc ) { /* look it up if possible */ if ( mc . getPrecision ( ) < E . precision ( ) ) { return E . round ( mc ) ; } else { /* Instantiate a 1.0 with the requested pseudo-accuracy
             * and delegate the computation to the public method above.
             */ BigDecimal uni = scalePrec ( BigDecimal . ONE , mc . getPrecision ( ) ) ; return exp ( uni ) ; } }
The base of the natural logarithm.

@param mc the required precision of the result
@return exp(1) = 2.71828....
The base of the natural logarithm .