Question: $$\log\left(\frac{1}{i^4}\right)=\log\left(\frac{1}{1}\right)=\color{red}{\mathbf{0}}$$

**Another way**

$$\log\left(\frac{1}{i^4}\right)=4\log\left(\frac{1}{i}\right)=4\log\left(\frac{i^3}{i^4}\right)=
4\log\left(\frac{i^3}{1}\right)
=4\log[\cos(\pi/2)+i\sin(\pi/2)]^3=$$
$$4\log[\cos(3\pi/2)+i\sin(3\pi/2)]=4\log e^{3\pi/2}=4\times 3\pi/2=\color{red}{\mathbf {6 \pi i}}$$

Why am I getting different results?

Answer: 
We want to find a rational number $q$ such that 
$$ \sqrt 2<q<p. $$
One idea is try to lower $p$, like
$$
q = \frac {k-1}k p <p
$$ 
with a suitable rational $k$. If you write the condition $\sqrt 2<q$, you get
$$
\sqrt 2<\frac {k-1}{k} p
$$
and obtain
$$
k \ge \frac{p}{p-\sqrt 2}.
$$
Any positive rational number $k$ above that bound gives you a good $q$. In order to get a rational number, you try to get rid of the $\sqrt 2$ by rationalization
$$
 \frac{p}{p-\sqrt 2} = \frac{p(p+\sqrt 2)}{p^2-2}
$$
and $2>\sqrt 2$, so
$$
k = \frac{p(p+ 2)}{p^2-2} > \frac{p(p+\sqrt 2)}{p^2-2}.
$$
Substituting it in $q$, you obtain
$$
q = \frac {k-1}{k} p = p - \frac {p}{k} = p - \frac{p^2-2}{p+ 2}.
$$

You do the same for the opposite inequality.
$q$ should be closer to $\sqrt2$ than $p$. It means that $p-q$ should have the same sign as $p-\sqrt2$ but its absolute value should be smaller than $|p-\sqrt2|$. The first requirement makes it convenient to choose $p-q$ as $p^2-2$ divided by some positive number. For $p\in A$, the maximal absolute value of this numerator is $2$, so if the denominator exceeds $\sqrt2$, it is enough. But we cannot use $\sqrt2$ directly yet, so we choose $2+$something as the denominator. For $p\in B$, we need the denominator to grow at least as fast as $p$, hence $p$ occurs in the denominator.