exp()

Learn how to use the exp() function to return the base-e exponential value of x.

The base-e exponential function of x, which is e raised to the power x: e^x.

Syntax

exp(x)

Parameters

NameTypeRequiredDescription
xreal✔️The value of the exponent.

Returns

The exponential value of x.

Examples

The following example shows how to use the exp() function to calculate the exponential value of 2.

print result = exp(2)

Output

result
7.389056
  • For natural (base-e) logarithms, see log().
  • For exponential functions of base-2 and base-10 logarithms, see exp2(), exp10().