e() : Euler’s Number Constant
On this page
Summary
Get the mathematical constant e (Euler’s number), approximately 2.71828.
Signature
e()
Parameters
None.
Returns
Type: Double
The value of e (approximately 2.71828182845905).
Examples
Display Constant
Output:
<p>Euler's number: 2.71828</p>
Exponential Growth
Data:
doc.Params["model"] = new {
initial = 100,
rate = 0.05,
time = 10
};
Output:
<p>Result: 164.87</p>
Natural Exponential
Output:
<p>e^2 = 7.389</p>
<p>exp(2) = 7.389</p>
Notes
- Returns constant value (no parameters)
- Value: 2.71828182845905…
- Base of natural logarithms
- Used in continuous growth/decay models
exp(x)is same aspow(e(), x)- For π (pi), use
pi()