Average Error: 31.4 → 0.6
Time: 7.7s
Precision: 64
Internal precision: 384
\[\frac{\tan^{-1}_* \frac{im}{re} \cdot \log base - \log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot 0}{\log base \cdot \log base + 0 \cdot 0}\]
\[\frac{\tan^{-1}_* \frac{im}{re} - 0}{\sqrt[3]{{\left(\log base\right)}^3}}\]

Error

Bits error versus re

Bits error versus im

Bits error versus base

Derivation

  1. Initial program 31.4

    \[\frac{\tan^{-1}_* \frac{im}{re} \cdot \log base - \log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot 0}{\log base \cdot \log base + 0 \cdot 0}\]
  2. Applied simplify 0.3

    \[\leadsto \color{blue}{\frac{\tan^{-1}_* \frac{im}{re} - 0}{\log base}}\]
  3. Using strategy rm
  4. Applied div-inv 0.4

    \[\leadsto \color{blue}{\left(\tan^{-1}_* \frac{im}{re} - 0\right) \cdot \frac{1}{\log base}}\]
  5. Using strategy rm
  6. Applied add-cbrt-cube 0.8

    \[\leadsto \left(\tan^{-1}_* \frac{im}{re} - 0\right) \cdot \color{blue}{\sqrt[3]{{\left(\frac{1}{\log base}\right)}^3}}\]
  7. Using strategy rm
  8. Applied cube-div 0.7

    \[\leadsto \left(\tan^{-1}_* \frac{im}{re} - 0\right) \cdot \sqrt[3]{\color{blue}{\frac{{1}^3}{{\left(\log base\right)}^3}}}\]
  9. Applied cbrt-div 0.6

    \[\leadsto \left(\tan^{-1}_* \frac{im}{re} - 0\right) \cdot \color{blue}{\frac{\sqrt[3]{{1}^3}}{\sqrt[3]{{\left(\log base\right)}^3}}}\]
  10. Applied associate-*r/ 0.6

    \[\leadsto \color{blue}{\frac{\left(\tan^{-1}_* \frac{im}{re} - 0\right) \cdot \sqrt[3]{{1}^3}}{\sqrt[3]{{\left(\log base\right)}^3}}}\]
  11. Applied simplify 0.6

    \[\leadsto \frac{\color{blue}{\tan^{-1}_* \frac{im}{re} - 0}}{\sqrt[3]{{\left(\log base\right)}^3}}\]
  12. Removed slow pow expressions

Runtime

Time bar (total: 7.7s) Debug logProfile

Please include this information when filing a bug report:

herbie shell --seed '#(1064524629 4159152179 2999149171 575749698 4006532819 692958815)'
(FPCore (re im base)
  :name "math.log/2 on complex, imaginary part"
  (/ (- (* (atan2 im re) (log base)) (* (log (sqrt (+ (* re re) (* im im)))) 0)) (+ (* (log base) (log base)) (* 0 0))))