Skip to main content

$exp

The $exp operator returns the value of e (Euler’s number) raised to the power of the input value.

Input

  • A single numeric value (the exponent)

Output

  • e raised to the power of the input value

Examples

Positive Exponent

{
  "$exp": [
    1
  ]
}
Result: 2.718281828459045 (approximately e^1)

Zero Exponent

{
  "$exp": [
    0
  ]
}
Result: 1 (e^0 = 1)

Negative Exponent

{
  "$exp": [
    -1
  ]
}
Result: 0.36787944117144233 (approximately e^-1)

Field Value

{
  "$exp": [
    {
      "$input": "growth_rate"
    }
  ]
}
Result: e raised to the power of the growth_rate field