I recently mentioned (again) the fact that you can compute logs through repeated square roots.
log(x) = 2^n (√√...n times...√x - 1)
But it's tricky because if you do too many square roots you lose accuracy.
And I also mentioned that you can do the same with complex numbers to compute the phase.
But what I didn't mention is that because the real and imaginary parts of complex numbers are stored and computed (somewhat) separately you don't need to worry as much about losing accuracy. In the attached Mathematica code I get away with 1000 square roots.
This is the secret behind the complex-step numerical differentiation method.
https://mdolab.engin.umich.edu/wiki/guide-complex-step-derivative-approximation
