$\pi$ in imaginary numbers? Look at the result of  $(-1)^{1/10000000}$ on the google calculator. You should get $$1 + 3.14159265 \times 10^{-7} i$$
Why does $\pi$ occur in imaginary number operations that don't include $\pi$?
 A: Let me refer to the Euler's formula
$$e^{ix} = \cos x + i \sin x.$$
There are many ways to 'derive' the formula but I am not going to make the derivation. You may find its nice derivations from Wikipedia.
In some textbook they define exponential function $e^x$ as other ways (for example, infinite series) and provide its inverse $\ln x$. If we have the exponential function and logarithmic function, we can define arbitrary exponent as
$$a^x = e^{x \ln a}.$$ 
We hope that such definition works for complex numbers. Unfortunately, a technical problem arises: complex logarithm is not well-defined. 
You can check that $e^{i\pi} = e^{3i\pi} = -1$. It says that the possible values of $\ln(-1)$ are $\pi i$ and $3\pi i$. In fact, $e^z = e^{z+2n\pi i}$ for all integer $n$ and the complex exponential has a period $2\pi i$. That problem is easily resolved: although the exponential function $\exp : \Bbb{C}\to\Bbb{C}-\{0\}$ is not one-to-one (so we can not find its inverse), its restriction on the set of complex $z$ with $-\pi < \operatorname{Im}z \le \pi$ is bijective. Let us call the inverse of it $\operatorname{Ln} z$, and many calculators adopt such definition of complex logarithm.
Now we can define the complex exponential as
$$a^z := e^{x\operatorname{Ln} a}.$$
Especially we get $(-1)^z = e^{\pi i z}$. For small real $t$,
$$(-1)^t = \cos (\pi t) + i \sin (\pi t) \approx 1 + i\pi t$$
(To derive last approximation, consider the Taylor expansion of $\cos$ and $\sin$.) This is the reason you got such computation result.
A: You know that $e^{i\pi}=-1$. Then :
$$(-1)^{\frac{1}{10^7}}=e^{\frac{i\pi}{10^7}} $$
since $x:=\frac{i\pi}{10^7}$ is very small you can approximate $e^x$ by $1+x$ hence :
$$(-1)^{\frac{1}{10^7}}=e^{x} \approx 1+x = 1+\pi.10^{-7}i $$
A: $$\left(-1\right)^{\frac{1}{10^7}}=\left(|-1|e^{\arg(-1)i}\right)^{\frac{1}{10^7}}=\left(e^{\pi i}\right)^{\frac{1}{10^7}}=e^{\frac{\pi i}{10^7}}=$$
$$\cos\left(\frac{\pi}{10^7}\right)+\sin\left(\frac{\pi}{10^7}\right)i\approx 0.999+3.1415\cdot10^{-7}i$$
