I need to calculate $e^{1763.192674118048}$, but when I try to calculate it directly using Matlab it returns "Inf", i.e. it can't calculate it. How do I calculate this? For what it's worth, just getting the right power of 10 would be accurate enough for my purposes.
Calculating very large powers of $e$
2.1k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 5 best solutions below
On
To get the approximate power of ten, i.e. the $\alpha$ in $e^x \approx 10^\alpha$, by taking natural logarithms on both sides, $x \approx \alpha \ln 10$, so $\alpha = \frac x {\ln 10}$. That gives approximately $765$.
On
If, for your purposes, it would be sufficient to convert a power of e into a power of 10, then you can just change the base of the exponent:
$$e^x = (10^{\log_{10}(e)})^x = 10^{x \log_{10}(e)}$$
For example, this is done in the following Matlab code:
x = 3.2
y = x*log10(exp(1))
exp(x), 10^y
On
Use vpa (variable-precision arithmetic). You can do it with strings
>> vpa('exp(1763.192674118048)')
ans =
5.5571088254929495883970009541213*10^765
or defining a symbolic variable
>> x = sym(1763.192674118048);
>> vpa(exp(x))
ans =
5.5571088254928906583892856815215*10^765
On
Since your looking for the power of 10, what you're asking is this:
Find $y$ such that $$e^{1763.192674118048}=10^y$$
Take the natural log of both sides:
$$\ln e^{1763.192674118048}= \ln 10^y$$
Bring the exponents to the front:
$$1763.192674118048\ln e= y\ln 10$$
Rewrite in terms of $y$ and evaluate ($\ln e = 1$):
$$y=\frac {1763.192674118048 \ln e}{\ln 10}= \frac{1763.192674118048}{\ln 10}\approx 765.7448489017067943$$
While $765.7448489017067943$ is number you're looking for because
$$e^{1763.192674118048}\approx 10^{765.7448489017067943}$$
you could write this in spiffy standard notation. Consider:
$$10^{765.7448489017067943}=(10^{765})(10^{0.7448489017067943})$$
$$=5.5571088254929496998\times 10^{765}$$
And, yes, that is a lot of decimal points, but we were fed a lot to begin with, so it's a fair trade.
$$ \left\lfloor \frac{1763.192674118048}{\log 10} \right\rfloor = 765 $$ This is the logarithm base $e,$ so $\log 10 \approx 2.30258509$
Since $$ \frac{1763.192674118048}{\log 10} \approx 765.7448488 $$ we find that your number is $$ e^{1763.192674118048} \approx 5.5571 \cdot 10^{765} $$ because $$ 10^{0.7448488} \approx 5.5571 $$