Given that the exponent of a quaternion $q = (w, \vec{v})$ with base $e$ is defined as
\begin{align} e^q = e^w (\cos |\vec{v}| + \frac{\vec{v}}{|\vec{v}|} \sin |\vec{v}|) \end{align}
and the logarithm is defined as
\begin{align} \ln q = (\ln |q|, \frac{\vec{v}}{|\vec{v}|} \cos^{-1} \frac{w}{|q|}) \end{align}
I'd like to define exponentiation with a different (real scalar) base. I attempt to derive it as follows:
\begin{align} b^q = e^{\ln b^q} = e^{q \ln b} \\ \end{align}
Similarly for logarithms:
\begin{align} z = \log_b q \\ b^z = q \\ e^{z \ln b} = q \\ z \ln b = \ln q \\ z = \frac{\ln q}{\ln b} \end{align}
Are these operations valid, and is that a reasonable way to define these two functions for quaternions?
I am particularly worried that $\ln e^q = q$ is not necessarily true in the last part.