Logarithm and exponent of real quaternions The logarithm of a general quaternion is defined as 
$$log(q) =\left (\left|q\right|, \frac{\mathbf{v}}{\left|\mathbf{v}\right|}cos^{-1}\left(\frac{r}{\left|q\right|}\right)\right),$$ 
in $(r,\mathbf{v})$ notation, where $r \in \mathbb{R}$ is the real part, and $\mathbf{v} \in \mathbb{R}^3$ is the vector part of the quaternion. The exponent is defined accordingly, so that supposedly $exp(log(q))=q$, no matter what branch we choose for $log(q)$.
However, for real quaternion ($\mathbf{v}=\mathbf{0}$), there is a definition problem. Even if we suppose that the undefined $\frac{\mathbf{v}}{\left|\mathbf{v}\right|}$ is just $\mathbf{0}$, we get $log(q)=(log\left|q\right|,\mathbf{0})$, which definitely does not reproduce $q$ with the exponent. It seems we lose the real part quantification this way. For instance, 
$$log(-1,0,0,0)=(0,0,0,0),\ exp(0,0,0,0)=(1,0,0,0).$$
Is there an alternative or more general definition that fixes this? 
 A: Your initial definition has a typo; the real part of $log(q)$ should be $log(|q|)$, not $|q|$.
The pure-real case is tricky; if $q$ is real then there are uncountably infinite values of $log(q)$. For example, $exp((0, (2n+1) \pi \mathbf{\hat u}))=(-1,\mathbf{0})$ for any unit $\mathbf{\hat u}$ and $n \in \mathbb{Z}$.
Anyway, to answer your question, the case $|\mathbf{v}|=0$ must be split out.
For positive reals, the imaginary component of the branches has the form $2n \pi \mathbf{\hat u}$, for any unit $\mathbf{\hat u}$ and any $n \in \mathbb{Z}$. If you choose the branch $n=0$, then $log(2, 0,0,0)$ = $(log(2), 0,0,0)$ which is exactly the logarithm on $\mathbb{R}$.
For negative reals, the imaginary component of the branches has the form $(2n+1) \pi \mathbf{\hat u}$. Thus $(log(k), 0,0,0)$ is not a valid value of $log(k, 0,0,0)$.
But, for example, if you choose $\mathbf{\hat u}=(1,0,0)$ then you get $log(-2, 0,0,0) = (log(|-2|), (2n+1)\pi, 0, 0)$. This is exactly the logarithm on $\mathbb{C}$.
