\[\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 re
Bits error versus im
Bits error versus base
Time: 5.5 s
Input Error: 30.5
Output Error: 0.5
Log:
Profile: 🕒
\(\frac{1}{\log base \cdot \frac{1}{\log \left(\sqrt{im^2 + re^2}^*\right)}}\)
  1. 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}\]
    30.5
  2. 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 \left(\sqrt{im^2 + re^2}^*\right)}{\log base}}\]
    0.4
  3. Using strategy rm
    0.4
  4. Applied clear-num to get
    \[\color{red}{\frac{\log \left(\sqrt{im^2 + re^2}^*\right)}{\log base}} \leadsto \color{blue}{\frac{1}{\frac{\log base}{\log \left(\sqrt{im^2 + re^2}^*\right)}}}\]
    0.4
  5. Using strategy rm
    0.4
  6. Applied div-inv to get
    \[\frac{1}{\color{red}{\frac{\log base}{\log \left(\sqrt{im^2 + re^2}^*\right)}}} \leadsto \frac{1}{\color{blue}{\log base \cdot \frac{1}{\log \left(\sqrt{im^2 + re^2}^*\right)}}}\]
    0.5

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))))