Skip to content

$exp

Raises Euler’s number e to the power of the supplied numeric expression.

Syntax

{ "$exp": <numberExpression> }

Example

Input

{ "growthRate": 1.2 }

Stage

{ "$project": { "continuousGrowth": { "$exp": "$growthRate" } } }

Output

{ "continuousGrowth": 3.3201169227365472 }