Skip to content

Exp ​

The natural exponential function exe^x.

✓ checked against that system · ! checked, with disagreements (hover a chip)WikipediaExponential functionMathWorldExponentialFunctionWikidataQ168698Britannicatopic/exponential-functionDLMF4.2.E19FungrimExp✓Fungrim entryWolfram LanguageExp!
Exp(x)exe^x, the natural exponential of x.
SageMathexp(x)✓SymPyexp(x)mpmathexp(x)Juliaenumeratio_ball(exp, x)Rustexp(x)
Typed signatures
TypePackageApplies
(number) -> numbercompute-enginealways

Domain: Elementary functions

Details
  • Inverse of Ln: ln⁡(ex)=x\ln(e^x) = x and eln⁡x=xe^{\ln x} = x for x>0x > 0.
  • Once the argument is symbolic, compute-engine represents Exp(x) as Power(ExponentialE, x) -- the same object as exe^x written with Power.
  • Applied to a matrix (or any nested list) it broadcasts element-wise, same as Wolfram's Exp -- this is NOT the matrix exponential, which is MatrixExp.

Plot

Examples

4 more kept as data, checked against the oracles
Basic #
live ↗
Ine0e^0Out11

Stays the exact constant rather than decimalizing

live ↗
Ine1e^1Outee

compute-engine represents Exp(x) as exe^x once the argument is symbolic

live ↗
Inexe^{x}Outexe^{x}

A machine-precision argument evaluates numerically

live ↗
Ine3.4e^{3.4}Out29.964 100 047 397 013 348 229.964\,100\,047\,397\,013\,348\,2
live ↗
InSeries⁡(ex,x,0,10)\operatorname{Series}(e^{x}, x, 0, 10)Out1+x+x22+x36+x424+x5120+x6720+x75 040+x840 320+x9362 880+x103 628 800+O(x11)1+x+\frac{x^2}{2}+\frac{x^3}{6}+\frac{x^4}{24}+\frac{x^5}{120}+\frac{x^6}{720}+\frac{x^7}{5\,040}+\frac{x^8}{40\,320}+\frac{x^9}{362\,880}+\frac{x^{10}}{3\,628\,800}+O\left(x^{11}\right)
Scope #

Broadcasts element-wise, giving (1ee1)\begin{pmatrix}1 & e\\ e & 1\end{pmatrix} -- NOT the matrix exponential (cosh⁡1sinh⁡1sinh⁡1cosh⁡1)\begin{pmatrix}\cosh 1 & \sinh 1\\ \sinh 1 & \cosh 1\end{pmatrix}, which is MatrixExp

live ↗
Ine[[0,1],[1,0]]e^{\bigl\lbrack\bigl\lbrack0, 1\bigr\rbrack, \bigl\lbrack1, 0\bigr\rbrack\bigr\rbrack}Out[[1,e],[e,1]]\bigl\lbrack\bigl\lbrack1, e\bigr\rbrack, \bigl\lbrack e, 1\bigr\rbrack\bigr\rbrack

Arbitrary precision via N(...)

live ↗
InN(e85)N(e^{\frac{8}{5}})Out4.953 032 424 395 114 803 654.953\,032\,424\,395\,114\,803\,65

Evaluates at a complex argument

live ↗
Ine2.5+ie^{2.5+i}Out6.582 229 578 192 772 984 4+10.251 215 190 529 404i6.582\,229\,578\,192\,772\,984\,4+10.251\,215\,190\,529\,404i

Euler's identity eiπ=−1e^{i\pi} = -1

live ↗
Ineiπe^{i π}Out−1-1
live ↗
Ineiπ\sqrt{e}^{i π}Outii

A special imaginary argument folds through eiθ=cos⁡θ+isin⁡θe^{i\theta} = \cos\theta + i\sin\theta

live ↗
Ineiπ5e^{\frac{i π}{5}}Out14+54+24i5−5\frac{1}{4}+\frac{\sqrt{5}}{4}+\frac{\sqrt{2}}{4}i\sqrt{5-\sqrt{5}}
live ↗
Ineln⁡(2)e^{\ln(2)}Out22

Inverse of Ln symbolically

live ↗
Ineln⁡(x)e^{\ln(x)}Outxx

eln⁡(1+2i)=1+2ie^{\ln(1+2i)} = 1+2i -- compute-engine's native eln⁡z=ze^{\ln z} = z fold holds for complex z too

live ↗
Ineln⁡(1+2i)e^{\ln(1+2i)}Out1+2i1+2i
live ↗
Ine−∞e^{-∞}Out00
live ↗
Ine∞e^{∞}Out∞∞

Element-wise over a matrix (not the matrix exponential -- see above)

live ↗
Ine[[1,(iπ)/2],[0,1]]e^{\bigl\lbrack\bigl\lbrack1, (i π)/2\bigr\rbrack, \bigl\lbrack0, 1\bigr\rbrack\bigr\rbrack}Out[[e,i],[1,e]]\bigl\lbrack\bigl\lbrack e, i\bigr\rbrack, \bigl\lbrack1, e\bigr\rbrack\bigr\rbrack

Interval arithmetic: exp⁡[−1,ln⁡2]=[e−1,2]\exp[-1, \ln 2] = [e^{-1}, 2]

live ↗
IneInterval(−1,ln⁡(2))e^{\mathrm{Interval}(-1, \ln(2))}OutInterval(1e,2)\mathrm{Interval}(\frac{1}{e}, 2)

Uncertainty propagation: e2±0.01≈7.389±0.074e^{2 \pm 0.01} \approx 7.389 \pm 0.074

live ↗
IneAround(2,0.01)e^{\mathrm{Around}(2, 0.01)}OutAround(7.389 056 098 930 65,0.073 890 560 989 306 5)\mathrm{Around}(7.389\,056\,098\,930\,65, 0.073\,890\,560\,989\,306\,5)

Its own derivative

live ↗
Indexdx\frac{\mathrm{d}e^{x}}{\mathrm{d}x}Outexe^{x}

Its own antiderivative

live ↗
In∫ ⁣ex dx\int\!e^{x}\, \mathrm{d}xOutexe^{x}

Taylor series about 0

live ↗
InSeries⁡(ex,x,0,4)\operatorname{Series}(e^{x}, x, 0, 4)Out1+x+x22+x36+x424+O(x5)1+x+\frac{x^2}{2}+\frac{x^3}{6}+\frac{x^4}{24}+O\left(x^5\right)

N()N() still decimalizes a combined product

live ↗
InN(e1e2)N(e^1e^2)Out20.085 536 923 187 66820.085\,536\,923\,187\,668

Agrees numerically with the plain product at a complex point

live ↗
InN(e1.3+0.7ie−0.4+2.1i)N(e^{1.3+0.7i}e^{-0.4+2.1i})Out−2.317 493 000 510 215+0.823 937 896 324 175 7i-2.317\,493\,000\,510\,215+0.823\,937\,896\,324\,175\,7i

To 50 significant digits, every one correctly rounded

live ↗
InN(e1,50)N(e^1, 50)Out2.718 281 828 459 045 235 360 287 471 352 662 497 757 247 093 72.718\,281\,828\,459\,045\,235\,360\,287\,471\,352\,662\,497\,757\,247\,093\,7

Matrix exponential of an upper triangular Jordan-like block

live ↗
InMatrixFunction(Exp,[[1,(1/2)iπ],[0,1]])\mathrm{MatrixFunction}(\mathrm{Exp}, \bigl\lbrack\bigl\lbrack1, (1/2)i π\bigr\rbrack, \bigl\lbrack0, 1\bigr\rbrack\bigr\rbrack)Out[[e,12ieπ],[0,e]]\bigl\lbrack\bigl\lbrack e, \frac{1}{2}ie π\bigr\rbrack, \bigl\lbrack0, e\bigr\rbrack\bigr\rbrack

The domain is all of the reals

live ↗
InFunctionDomain(ex,x)\mathrm{FunctionDomain}(e^{x}, x)OutTrue\mathrm{True}

The range is the positive reals: y>0y > 0

live ↗
InFunctionRange(ex,x,y)\mathrm{FunctionRange}(e^{x}, x, y)Out0<y0\lt y

Entire, so analytic everywhere

live ↗
InFunctionAnalytic(ex,x)\mathrm{FunctionAnalytic}(e^{x}, x)OutTrue\mathrm{True}

Strictly increasing everywhere (monotonicity 1)

live ↗
InFunctionMonotonicity(ex,x)\mathrm{FunctionMonotonicity}(e^{x}, x)Out11

One-to-one on the reals

live ↗
InFunctionInjective(ex,x)\mathrm{FunctionInjective}(e^{x}, x)OutTrue\mathrm{True}

Not onto the reals, since it never reaches 0 or below

live ↗
InFunctionSurjective(ex,x)\mathrm{FunctionSurjective}(e^{x}, x)OutFalse\mathrm{False}

Always positive, sign 1

live ↗
InFunctionSign(ex,x)\mathrm{FunctionSign}(e^{x}, x)Out11

No singularities anywhere

live ↗
InFunctionSingularities(ex,x)\mathrm{FunctionSingularities}(e^{x}, x)OutFalse\mathrm{False}

No discontinuities anywhere

live ↗
InFunctionDiscontinuities(ex,x)\mathrm{FunctionDiscontinuities}(e^{x}, x)OutFalse\mathrm{False}

Convex everywhere (convexity 1)

live ↗
InFunctionConvexity(ex,x)\mathrm{FunctionConvexity}(e^{x}, x)Out11
live ↗
InN(e85,50)N(e^{\frac{8}{5}}, 50)Out4.953 032 424 395 114 803 654 286 356 423 964 256 413 031 123 556 64.953\,032\,424\,395\,114\,803\,654\,286\,356\,423\,964\,256\,413\,031\,123\,556\,6
live ↗
Ine92iπe^{\frac{9}{2}i π}Outii
live ↗
InExpToTrig(e(1/5)iπ)\mathrm{ExpToTrig}(e^{(1/5)i π})Out14+54+24i5−5\frac{1}{4}+\frac{\sqrt{5}}{4}+\frac{\sqrt{2}}{4}i\sqrt{5-\sqrt{5}}
live ↗
InAssuming(n∈Z,Refine(e2πin))\mathrm{Assuming}(n∈ℤ, \mathrm{Refine}(e^{2πi n}))Oute2iπne^{2i πn}
live ↗
InAssuming(n∈Z,Refine(e2πi(n+1/2)))\mathrm{Assuming}(n∈ℤ, \mathrm{Refine}(e^{2πi(n+1/2)}))Oute2iπ(n+12)e^{2i π(n+\frac{1}{2})}
Applications #

Threads element-wise over a list

live ↗
Ine[0,1]e^{\bigl\lbrack0, 1\bigr\rbrack}Out[1,e]\bigl\lbrack1, e\bigr\rbrack
Properties #

Inverse of Ln: eln⁡x=xe^{\ln x} = x

live ↗
Ineln⁡(5)=5e^{\ln(5)}=5OutTrue\mathrm{True}

ea eb=ea+be^a \, e^b = e^{a+b}

live ↗
Ine2e3=e5e^2e^3=e^5OutTrue\mathrm{True}

ee as the limit lim⁡x→∞(1+1/x)x\lim_{x\to\infty}(1 + 1/x)^x

live ↗
Inlim⁡x→∞(1+1x)x\lim_{x→∞}(1+\frac{1}{x})^{x}Outee

lim⁡x→0ex−1x=1\lim_{x\to0}\frac{e^x - 1}{x} = 1

live ↗
Inlim⁡x→0ex−1x\lim_{x→0}\frac{e^{x}-1}{x}Out11

A product of exponentials combines: exey=ex+ye^x e^y = e^{x+y}

live ↗
Inexeye^{x}e^{y}Outex+ye^{x+y}

Combines past two factors

live ↗
Ineaebece^{a}e^{b}e^{c}Outea+b+ce^{a+b+c}

Combines past extra, non-exponential factors in the product

live ↗
In2exeyz2e^{x}e^{y}zOut2zex+y2ze^{x+y}

exe−xe^x e^{-x} cancels to 1, past what compute-engine's own like-term merge catches

live ↗
Inexe−xe^{x}e^{-x}Out11

Euler's formula eix=cos⁡x+isin⁡xe^{ix} = \cos x + i\sin x via ExpToTrig

live ↗
InExpToTrig(eix)\mathrm{ExpToTrig}(e^{i x})Outisin⁡(x)+cos⁡(x)i\sin(x)+\cos(x)
Possible issues #

eln⁡(−2)e^{\ln(-2)} is left as eiπ+ln⁡2e^{i\pi + \ln 2} rather than folding to −2-2

live ↗
Ineln⁡(−2)e^{\ln(-2)}Outeiπ+ln⁡(2)e^{i π+\ln(2)}

A lone Exp factor is untouched -- the combine rule needs at least two

live ↗
Inexye^{x}yOutyexye^{x}

2x2y2^x 2^y is also an identity, but this rule only touches ExponentialE -- left to compute-engine's own rules

live ↗
In2x×2y2^{x}×2^{y}Out2x×2y2^{x}×2^{y}

Exp(ComplexInfinity) is Indeterminate -- Exp(z) canonicalizes to Power(ExponentialE, z) before this head's own evaluate ever runs, so the fix lives on Power's exponent side. See Power.

live ↗

Known value · DLMF 4.2, via Power(ExponentialE, ComplexInfinity)

About
Examples59
Checked againstWolfram Language 56 agree3 differSageMath 38 agree1 errorSymPy 38 agree2 differ1 unevaluatedmpmath 24 agreeJulia 23 agree3 errorRust 12 agree1 differ3 error
CrosswalkWikipediaMathWorldWikidataBritannicaDLMFFungrimFungrim entry ×144Wolfram LanguageSageMathSymPympmathJuliaRust

Implementation

mappedsympypackages/oracle/src/mappings.ts
mappedmpmathpackages/oracle/src/mappings.ts
mappedsagepackages/oracle/src/mappings.ts
mappedrustpackages/oracle/src/mappings.ts
mappedjuliapackages/oracle/src/mappings.ts

See also: Ln, Log, Sinh, MatrixExp