exp() : Exponential (e^x)
On this page
Summary
Calculate e (Euler’s number) raised to a specified power.
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
Data:
doc.Params["model"] = new {
value = 2
};
Output:
<p>e^2 = 7.39</p>
Growth Calculation
Data:
doc.Params["model"] = new {
initial = 1000,
rate = 0.05,
time = 10
};
Output:
<p>Population: 1649</p>
Exponential Decay
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)