Average Error: 32.7 → 8.5
Time: 50.1s
Precision: 64
Internal Precision: 2176
\[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)\]
\[\begin{array}{l} \mathbf{if}\;\frac{\sqrt[3]{{\left(\sin \left((\left(\log \left(\sqrt{x.im^2 + x.re^2}^*\right)\right) \cdot y.im + \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right))_*\right)\right)}^{3}}}{\frac{{\left(e^{y.im}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}}{{\left(\sqrt{x.im^2 + x.re^2}^*\right)}^{y.re}}} = -\infty:\\ \;\;\;\;\frac{\sin \left(\sqrt{(\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))_*} \cdot \sqrt{(\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)}{\frac{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}{{\left(\sqrt{x.im^2 + x.re^2}^*\right)}^{y.re}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin \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)}{\frac{e^{\left(y.im \cdot \left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \cdot \left(\left(\sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}}\right) \cdot \sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}}\right)}}{{\left(\sqrt{x.im^2 + x.re^2}^*\right)}^{y.re}}}\\ \end{array}\]

Error

Bits error versus x.re

Bits error versus x.im

Bits error versus y.re

Bits error versus y.im

Derivation

  1. Split input into 2 regimes
  2. if (/ (cbrt (pow (sin (fma (log (hypot x.im x.re)) y.im (* y.re (atan2 x.im x.re)))) 3)) (/ (pow (exp y.im) (atan2 x.im x.re)) (pow (hypot x.im x.re) y.re)))

    1. Initial program 58.4

      \[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. Applied simplify62.7

      \[\leadsto \color{blue}{\frac{\sin \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)}{\frac{{\left(e^{y.im}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}}{{\left(\sqrt{x.im^2 + x.re^2}^*\right)}^{y.re}}}}\]
    3. Using strategy rm
    4. Applied pow-exp55.8

      \[\leadsto \frac{\sin \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)}{\frac{\color{blue}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}}{{\left(\sqrt{x.im^2 + x.re^2}^*\right)}^{y.re}}}\]
    5. Using strategy rm
    6. Applied add-sqr-sqrt59.4

      \[\leadsto \frac{\sin \color{blue}{\left(\sqrt{(\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))_*} \cdot \sqrt{(\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)}}{\frac{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}{{\left(\sqrt{x.im^2 + x.re^2}^*\right)}^{y.re}}}\]

    if (/ (cbrt (pow (sin (fma (log (hypot x.im x.re)) y.im (* y.re (atan2 x.im x.re)))) 3)) (/ (pow (exp y.im) (atan2 x.im x.re)) (pow (hypot x.im x.re) y.re)))

    1. Initial program 32.5

      \[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. Applied simplify8.8

      \[\leadsto \color{blue}{\frac{\sin \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)}{\frac{{\left(e^{y.im}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}}{{\left(\sqrt{x.im^2 + x.re^2}^*\right)}^{y.re}}}}\]
    3. Using strategy rm
    4. Applied pow-exp8.0

      \[\leadsto \frac{\sin \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)}{\frac{\color{blue}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}}{{\left(\sqrt{x.im^2 + x.re^2}^*\right)}^{y.re}}}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt8.0

      \[\leadsto \frac{\sin \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)}{\frac{e^{y.im \cdot \color{blue}{\left(\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\right)}}}{{\left(\sqrt{x.im^2 + x.re^2}^*\right)}^{y.re}}}\]
    7. Applied associate-*r*8.0

      \[\leadsto \frac{\sin \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)}{\frac{e^{\color{blue}{\left(y.im \cdot \left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}}}}{{\left(\sqrt{x.im^2 + x.re^2}^*\right)}^{y.re}}}\]
    8. Using strategy rm
    9. Applied add-cube-cbrt8.0

      \[\leadsto \frac{\sin \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)}{\frac{e^{\left(y.im \cdot \left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \cdot \color{blue}{\left(\left(\sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}}\right) \cdot \sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}}\right)}}}{{\left(\sqrt{x.im^2 + x.re^2}^*\right)}^{y.re}}}\]
  3. Recombined 2 regimes into one program.

Runtime

Time bar (total: 50.1s)Debug logProfile

herbie shell --seed '#(1070258749 1877548225 2229079127 1588002776 3179087814 1886870650)' +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)))))