Number.Exp
NumberReturns e raised to the power of a number (the inverse of Number.Ln).
Syntax
Number.Exp(number as nullable number) as nullable numberParameters
| Name | Type | Required | Description |
|---|---|---|---|
number | number | Yes | The exponent to which e is raised. |
Return Value
number — e raised to the power of the given number.
Remarks
Number.Exp computes e^x, where e is Euler's number (approximately 2.71828182845904523). It is the inverse of Number.Ln: Number.Exp(Number.Ln(x)) = x for any positive x, and Number.Ln(Number.Exp(x)) = x for any real x.
Number.Exp(0) = 1 and Number.Exp(1) = e. For large positive x, the result grows extremely rapidly and overflows to infinity around x ≈ 709. For large negative x, the result approaches 0. These limits are inherent to double-precision floating-point.
Common uses in data transformation include continuous compounding in finance (FV = PV * e^(r*t)), exponential growth and decay models, and softmax-style normalization. The exponential function is also the building block for Number.Cosh and Number.Sinh, defined as (e^x ± e^(-x)) / 2. Note that Number.Power(Number.E, x) is equivalent but less precise and slower than Number.Exp(x) for most implementations.
Examples
Example 3: Continuous compounding — compute final investment value
let
Principal = 1000,
Rate = 0.05,
Years = 3,
FinalValue = Principal * Number.Exp(Rate * Years)
in
FinalValueThe final output — the continuously compounded future value of the investment after 3 years.
Result | |
|---|---|
| 1 | 1,161.83 |