Average Error: 32.0 → 3.2
Time: 30.5s
Precision: 64
Internal Precision: 1408
\[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
\[e^{\log \left(\sqrt{x.im^2 + x.re^2}^*\right) \cdot y.re - \left(\sqrt[3]{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sqrt[3]{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right) \cdot \sqrt[3]{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \log_* (1 + (e^{\cos \left((\left(\log \left(\sqrt{x.im^2 + x.re^2}^*\right)\right) \cdot y.im + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right))_*\right)} - 1)^*)\]

Error

Bits error versus x.re

Bits error versus x.im

Bits error versus y.re

Bits error versus y.im

Derivation

  1. Initial program 32.0

    \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
  2. Applied simplify9.3

    \[\leadsto \color{blue}{\frac{{\left(\sqrt{x.im^2 + x.re^2}^*\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot \cos \left((\left(\log \left(\sqrt{x.im^2 + x.re^2}^*\right)\right) \cdot y.im + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right))_*\right)}\]
  3. Using strategy rm
  4. Applied pow-exp8.5

    \[\leadsto \frac{{\left(\sqrt{x.im^2 + x.re^2}^*\right)}^{y.re}}{\color{blue}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \cdot \cos \left((\left(\log \left(\sqrt{x.im^2 + x.re^2}^*\right)\right) \cdot y.im + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right))_*\right)\]
  5. Applied add-exp-log8.5

    \[\leadsto \frac{{\color{blue}{\left(e^{\log \left(\sqrt{x.im^2 + x.re^2}^*\right)}\right)}}^{y.re}}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \cos \left((\left(\log \left(\sqrt{x.im^2 + x.re^2}^*\right)\right) \cdot y.im + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right))_*\right)\]
  6. Applied pow-exp8.5

    \[\leadsto \frac{\color{blue}{e^{\log \left(\sqrt{x.im^2 + x.re^2}^*\right) \cdot y.re}}}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \cos \left((\left(\log \left(\sqrt{x.im^2 + x.re^2}^*\right)\right) \cdot y.im + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right))_*\right)\]
  7. Applied div-exp3.2

    \[\leadsto \color{blue}{e^{\log \left(\sqrt{x.im^2 + x.re^2}^*\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \cos \left((\left(\log \left(\sqrt{x.im^2 + x.re^2}^*\right)\right) \cdot y.im + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right))_*\right)\]
  8. Using strategy rm
  9. Applied add-cube-cbrt3.2

    \[\leadsto e^{\log \left(\sqrt{x.im^2 + x.re^2}^*\right) \cdot y.re - \color{blue}{\left(\sqrt[3]{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sqrt[3]{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right) \cdot \sqrt[3]{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \cdot \cos \left((\left(\log \left(\sqrt{x.im^2 + x.re^2}^*\right)\right) \cdot y.im + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right))_*\right)\]
  10. Using strategy rm
  11. Applied log1p-expm1-u3.2

    \[\leadsto e^{\log \left(\sqrt{x.im^2 + x.re^2}^*\right) \cdot y.re - \left(\sqrt[3]{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sqrt[3]{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right) \cdot \sqrt[3]{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \color{blue}{\log_* (1 + (e^{\cos \left((\left(\log \left(\sqrt{x.im^2 + x.re^2}^*\right)\right) \cdot y.im + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right))_*\right)} - 1)^*)}\]

Runtime

Time bar (total: 30.5s)Debug logProfile

herbie shell --seed '#(1064173506 2580572819 2847706409 4129882574 1125180799 1845288547)' +o rules:numerics
(FPCore (x.re x.im y.re y.im)
  :name "powComplex, real part"
  (* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (cos (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))