I was using my calculator (TI-83 Plus) to do some calculations involving complex and imaginary numbers, and I found in two cases that something weird will happen in the following scenario:
I did $log(-1)$ which gave some decimal along with i (my calculator was in a+bi mode). I stored that in a variable $D$, and did $10^D$, which should return just $-1$, as $log(-1)=x$ is the same as $10^x=-1$. However, it gave me back a complex number with a really small negative part. $-1+2\cdot 10^{-13}i$ (the calculator just said $-1+2e-13i$, so I'm not sure if it means $2\cdot 10^{-13}i$ or $2\cdot 10^{-13}i$, I think it is the latter) Why does it do that?
It happened in a different scenario for me a long time ago, but I don't quite remember what it was.
Edit: I remember the second scenario, and this one I don't know why it does this: i did $(-2-2i)^2$ and it said the answer is $8\cdot10^{-13}+8i$. It doesn't happen when I change the sign of the first 2, but not the second. With $log(-1)$, it's probably because it's irrational, but with this scenario, I'm not really dealing with any irrational numbers.