Skip to main content Link Search Menu Expand Document Toggle dark mode Copy Code (external link)

exp() : Exponential (e^x)

Calculate e (Euler’s number) raised to a specified power.


On this page

Signature

exp(value)

Parameters

Parameter Type Required Description
value Number Yes The exponent

Returns

Type: Double

e raised to the power of the value (e^value).


Examples

Basic Exponential

<p>e^{{model.value}} = {{format(exp(model.value), '0.00')}}</p>

Data:

doc.Params["model"] = new {
    value = 2
};

Output:

<p>e^2 = 7.39</p>

Growth Calculation

<p>Population: {{format(model.initial * exp(model.rate * model.time), '0')}}</p>

Data:

doc.Params["model"] = new {
    initial = 1000,
    rate = 0.05,
    time = 10
};

Output:

<p>Population: 1649</p>

Exponential Decay

<p>Remaining: {{format(model.initial * exp(-model.decayRate * model.time), '0.00')}}</p>

Data:

doc.Params["model"] = new {
    initial = 100,
    decayRate = 0.1,
    time = 5
};

Output:

<p>Remaining: 60.65</p>

Notes

  • Returns e^x where e ≈ 2.71828
  • Inverse of log() (natural logarithm)
  • Used in continuous growth/decay models
  • Returns double-precision floating-point
  • For other bases, use pow(base, exponent)

See Also