I've rarely seen the notation $\exp(f(x))$ but whenever I do I just replace it with $e^{f(x)}$. Is this correct, or do these mean something different? Also, in computer science, should these be replaced rather with $2^{f(x)}$ since the base mostly considered is $2$?
-
3Yes, indeed $\exp(f(x)) = e^{f(x)}$. Regarding the second question, I have not come across the case when $\exp$ is treated as $2$. I would say, unless otherwise stated, treat $\exp$ as $e$. – spaceman Jun 02 '22 at 08:44
-
2Indeed it is almost never the case that $\mathrm{exp}(f(x))\neq e^{f(x)}$. If not otherwise stated, you can assume $\mathrm{exp}(f(x))=e^{f(x)}$. – math-physicist Jun 02 '22 at 08:50
-
1$\exp(f(x))$ and $e^{f(x)}$ may or may not be equal, depending on the notational convention. My answers are here and the bottom of here; also, check out David C. Ullrich's answer here. – ryang Jun 02 '22 at 10:06
2 Answers
Is this correct, or do these mean something different?
Yes, it is correct.
And yes, it is different — typographically. If the exponent gets complicated, typesetting the exponent can result in tiny symbols that might be hard to read. Using $\exp$ makes the exponent "one level" bigger. Using notation $e^x$ is preferred, IMHO, for simple exponents because it is shorter and needs less parenthesis.
Also, in computer science, should these be replaced rather with $2^{f(x)}$ since the base mostly considered is $2$?
No, of course not. Some math libs provide functions like $\operatorname{exp2}$ and $\operatorname{exp10}$ for bases 2 and 10, respectively, but $\exp$ is still base $e$.

- 10,390
- 2
- 12
- 31
For typographical puroses, when the exponent is complicated, it is preferable to write it with $\exp$ for readability. Compare $$ \exp\left(\frac{(\ln x)^2}{\sqrt{x^2+1}}\right) = e^{\frac{(\ln x)^2}{\sqrt{x^2+1}}} $$
Sometimes in elementary texts we define a function $\exp$, develop some of its properties, and only after a while (from the properties) can we see that it is reasonable to write $e^x$ for this function.

- 111,679