\[\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\log base \cdot \log base + 0 \cdot 0}\]
Test:
math.log/2 on complex, real part
Bits:
128 bits
Bits error versus reBits error versus imBits error versus base
\(\frac{{\left(\log base \cdot \log \left(\sqrt{{re}^2 + im \cdot im}\right)\right)}^{1} + 0}{\log base \cdot \log base}\)
Started with
\[\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\log base \cdot \log base + 0 \cdot 0}\]
14.9
Applied simplify to get
\[\color{red}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0}{\log base \cdot \log base + 0 \cdot 0}} \leadsto \color{blue}{\frac{\log base \cdot \log \left(\sqrt{{re}^2 + im \cdot im}\right) + 0}{\log base \cdot \log base}}\]
14.9
Using strategy rm
14.9
Applied pow1 to get
\[\frac{\log base \cdot \color{red}{\log \left(\sqrt{{re}^2 + im \cdot im}\right)} + 0}{\log base \cdot \log base} \leadsto \frac{\log base \cdot \color{blue}{{\left(\log \left(\sqrt{{re}^2 + im \cdot im}\right)\right)}^{1}} + 0}{\log base \cdot \log base}\]
14.9
Applied pow1 to get
\[\frac{\color{red}{\log base} \cdot {\left(\log \left(\sqrt{{re}^2 + im \cdot im}\right)\right)}^{1} + 0}{\log base \cdot \log base} \leadsto \frac{\color{blue}{{\left(\log base\right)}^{1}} \cdot {\left(\log \left(\sqrt{{re}^2 + im \cdot im}\right)\right)}^{1} + 0}{\log base \cdot \log base}\]
14.9
Applied pow-prod-down to get
\[\frac{\color{red}{{\left(\log base\right)}^{1} \cdot {\left(\log \left(\sqrt{{re}^2 + im \cdot im}\right)\right)}^{1}} + 0}{\log base \cdot \log base} \leadsto \frac{\color{blue}{{\left(\log base \cdot \log \left(\sqrt{{re}^2 + im \cdot im}\right)\right)}^{1}} + 0}{\log base \cdot \log base}\]
14.9
Original test:
(lambda ((re default) (im default) (base default))
#:name "math.log/2 on complex, real part"
(/ (+ (* (log (sqrt (+ (* re re) (* im im)))) (log base)) (* (atan2 im re) 0)) (+ (* (log base) (log base)) (* 0 0))))