I am trying to graph $\displaystyle {y=10^{-350}e^x}$ on desmos. However, this is returning a straight line with a stopping point at (709.783,0).
Is this a normal trait of very small exponentials that I haven't come across? Or is it simply the limits of desmos' software?
Thanks, Ben
https://www.desmos.com/calculator/hf1kx6mtyf
(There's the graph. Feel free to ignore the data points.)
It appears that Desmos uses the double-precision IEEE-754 encoding for the numbers for its calculations. This is the implementation of the data type known as a
doublein languages such as Java and C++ on (almost?) all modern computers.The largest possible number that can be represented in double-precision IEEE-754 is $(2 - 2^{-52})\times 2^{1023} \approx 1.8 \times 10^{308}.$ Note that $\ln((2 - 2^{-52})\times 2^{1023}) \approx 709.7827,$ so $e^{709.783}$ is too large to be represented in this format, whereas $e^{709.782}$ can be represented.
On the other hand, the smallest positive number that can be represented in double-precision IEEE-754 is $2^{-1074} \approx 4.9 \times 10^{-324}.$ Since $10^{-350}$ is much smaller than that, it would be rounded to zero.
In order to evaluate $10^{-350} e^x$ using double-precision IEEE-754 numbers and arithmetic, if we do not do some clever symbolic manipulation but simply perform the operations literally written in that expression, then we get zero times some real number for all $x$ such that $e^x$ can be represented as a finite number in double-precision IEEE-754 format, and zero times infinity otherwise. Zero times any real number is zero, and zero times infinity is considered "not a number" in IEEE-754, so the value of the expression is zero until $x$ gets too great for the expression to have any numeric value at all. The switchover point is near $x = 709.783.$
If you graph $y=\left(10^{-175}\cdot e^{x/2}\right)^2,$ which is exactly the same function in pure mathematics, Desmos shows something that looks like a proper exponential graph, reaching the value $y=1$ at $x \approx 805.9$ and increasing exponentially after that.