Branch cuts can be a little bit difficult with Python since once you pick a branch, it forgets you are tracing the path.
This topic seems a little at the edge of numerical processing. Look at this incomplete iPython notebook he basically just gives up.
Similar frustrations were encountered in the 19th century with functions like $\sqrt{z^2-1}$ and they did not have computers available to them... nonetheless they were able to visualize them and leave to profound mathematics at the time.
This is how they were led to the theory of Riemann surfaces, how Poincare discovered homotopy theory and homology theory. Then it was known as analysis situs - see! It was considered a branch of analysis at the time.
The problem is your "numbers" need to remember the path where they came from.
I propose instead of thinking of the function $w = \sqrt{1-z^2}$ you consider the set of points satisfying $\{(z,w): z^2 + w^2 = 1\}$. Even though we know it is just a matter of a simple sign, $(z, \pm w)$, it saves the computer from getting messed up about which branch your are working on.
Then you have to modify whatever algorithm you are working with be it numerical integration or some approximation algorithm, to work on your Riemann surface.
I think this succumbs to applications of Dirichlet's test and some estimates based on the mean value theorem.
Dirichlet's test gives conditional convergence of a sum $\sum_{n \geq 1} a_n b_n$ provided that $a_n$ is a sequence of positive numbers that decrease to $0$ and the sequence of partial sums $B_n = \sum_{k=1}^n b_k$ is uniformly bounded in absolute value. In this case, take $a_n = n^{-\sigma}$ and $b_n = (-1)^{n+1} n^{-it}$. Clearly the $a_n$ decrease to $0$ if $\sigma > 0$, so we just need to get the uniform boundedness of the $B_n$.
It suffices to bound $\sum_{k=1}^n (2k-1)^{-it} - (2k)^{-it}$. Clearly this is bounded for $t=0$, so assume $t\neq 0$. The real and imaginary parts are
$$C_n = \sum_{k=1}^n \cos(t\log(2k-1)) - \cos(t\log(2k)),$$
$$S_n = \sum_{k=1}^n \sin(t\log(2k)) - \sin(t\log(2k-1)).$$
Let's show how to bound the imaginary part $S_n$; the real part is bounded by a wholly analogous technique.
By the mean value theorem, the $k$-th term of $S_n$ is
$$\frac{t\cos(t\log(x))}{x}$$
for some $x \in [2k-1, 2k]$. This is not much different from $\frac{t\cos(t\log(2k-1))}{2k-1}$; in fact, the difference between them is, again by the mean value theorem,
$$-\frac{t^2 \sin(t\log(y)) + t\cos(t\log(y))} {y^2} (x - (2k - 1))$$
for some $y \in [2k-1, x]$, whose absolute value is bounded above by $\frac{t^2+t}{(2k-1)^2}$. Since $\sum_{k\geq 1} \frac1{(2k-1)^2}$ converges, this reduces us to putting a uniform bound on the absolute value of
$$\sum_{k=1}^n \frac{\cos(t\log(2k-1))}{2k-1} = \text{Re}\sum_{k=1}^n \frac1{(2k-1)^{1 + it}}.$$
Put $z = 1 + it$; we may as well bound the absolute value of
$$\sum_{k=1}^n \frac1{(2k-1)^z} = \sum_{k=1}^n \left[\int_k^{k+1} \frac1{(2k-1)^z} - \frac1{(2x-1)^z} dx\right] + \int_1^{n+1} \frac1{(2x-1)^z} dx.$$
The last integral is easily evaluated as $\left[\frac{(2x-1)^{-it}}{-2it}\right]_1^{n+1}$ which in absolute value is bounded above by $\frac1{t}$. We turn now to the preceding sum of integrals. The integrands are bounded thus:
$$\left|(2k-1)^{-z} - (2x-1)^{-z}\right| = \left|\int_{2k-1}^{2x-1} \frac{z}{t^{z+1}}\; dt\right| \leq \frac{2|z|}{(2k-1)^{\text{Re}(z) + 1}}.$$
Thus the sum of the integrals is bounded by the finite quantity $2|1+it| \sum_{k=1}^\infty \frac1{(2k-1)^2}$, and we are done.
Best Answer
This is a standard problem in CA, but it is mispresented in the case of the OP.
The correct question (as it appears on Churchill and Brown for example) is:
Not that it WILL happen, afortiori.
Like many commenters already said, this depends on the choice of branch of the complex function $\log$ one takes, but there's more to it than just that.
If the same branch is chosen for both cases, the result is equality. To dispel notions to the contrary, with Maple:
and using the same branch, we have:
ln(2)+(1/2*I)*Pi
ln(2)+(1/2*I)*Pi
Different pairs of $k\in\mathbb{Z}$ in the previous, will of course break equality.
There is, however, a different reason why equality may break: A different $\mathit{definition}$ of the complex function $\log$.
The standard definition used most often with the cut being the negative axis, is:
$$\log(k,z)=\ln(|z|)+(\arg(z)+2k\pi)i,\text{with:}\arg(z)\in(-\pi,\pi], k\in\mathbb{Z}$$
One, however, may define the complex $\log$ function to admit a branch cut starting from zero (where the function is not even defined) and extending out to infinity towards any direction one wants, so if one defines for example:
$$\log^*(k,z)=\ln(|z|)+(\arg(z)+2k\pi)i,\text{with:}\arg(z)\in(2\pi/p-2\pi,2\pi/p],k\in\mathbb{Z},p\in\mathbb{N}\setminus\{1\}$$
then this is a perfectly good definition for the complex $\log$ map, but will break many such equalities if one chooses $\arg$ lying on opposite sides of the cut depending on the complex values given, thus the inequality for specific examples.
Concluding, equality may break not only with different branches but also with different definitions of $\log$.