Ok, thanks! I had worked it out... I knew it has ln, but i needed log10.
There is a theorem that says: logY(a)=ln(a)/ln(Y). To Q2 is done.
This is a matter bookkeeping since for a complex
number a + ib, you'll need to keep track of the real
and imaginary parts. Then you'll need to implement
the specific arithmetic you desire
This is not terribly difficult - see for instance: