Average Error: 33.0 → 3.8
Time: 42.5s
Precision: 64
Internal Precision: 2112
\[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 \sin \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)\]
\[\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \cos \left(\log \left(\sqrt{x.re^2 + x.im^2}^*\right) \cdot y.im\right) + \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\cos \left(y.im \cdot \log \left(\sqrt[3]{\sqrt{x.re^2 + x.im^2}^*} \cdot \sqrt[3]{\sqrt{x.re^2 + x.im^2}^*}\right)\right) \cdot \left(\left(\sqrt[3]{\sin \left(\log \left(\sqrt[3]{\sqrt{x.re^2 + x.im^2}^*}\right) \cdot y.im\right)} \cdot \sqrt[3]{\sin \left(\log \left(\sqrt[3]{\sqrt{x.re^2 + x.im^2}^*}\right) \cdot y.im\right)}\right) \cdot \sqrt[3]{\sin \left(\log \left(\sqrt[3]{\sqrt{x.re^2 + x.im^2}^*}\right) \cdot y.im\right)}\right) + \cos \left(\log \left(\sqrt[3]{\sqrt{x.re^2 + x.im^2}^*}\right) \cdot y.im\right) \cdot \sin \left(\log \left(\sqrt[3]{\sqrt{x.re^2 + x.im^2}^*}\right) \cdot \left(y.im + y.im\right)\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re^2 + x.im^2}^*\right) \cdot y.re}}\]

Error

Bits error versus x.re

Bits error versus x.im

Bits error versus y.re

Bits error versus y.im

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 33.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 \sin \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. Initial simplification9.7

    \[\leadsto \frac{\sin \left((y.im \cdot \left(\log \left(\sqrt{x.re^2 + x.im^2}^*\right)\right) + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right))_*\right)}{\frac{{\left(e^{y.im}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}}{{\left(\sqrt{x.re^2 + x.im^2}^*\right)}^{y.re}}}\]
  3. Using strategy rm
  4. Applied pow-to-exp9.7

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

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

    \[\leadsto \frac{\sin \left((y.im \cdot \left(\log \left(\sqrt{x.re^2 + x.im^2}^*\right)\right) + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right))_*\right)}{\color{blue}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} - \log \left(\sqrt{x.re^2 + x.im^2}^*\right) \cdot y.re}}}\]
  7. Using strategy rm
  8. Applied fma-udef3.7

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

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

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

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

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

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

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

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

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

Runtime

Time bar (total: 42.5s)Debug logProfile

herbie shell --seed 2018249 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
  :name "powComplex, imaginary part"
  (* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (sin (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))