Average Error: 33.0 → 12.3
Time: 48.7s
Precision: 64
Internal Precision: 1344
\[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)\]
\[\begin{array}{l} \mathbf{if}\;\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + \left(\log x.re \cdot y.re + 1\right) \le 0.9921358753406202:\\ \;\;\;\;{\left(\log \left(e^{\sqrt[3]{\sqrt{x.im \cdot x.im + x.re \cdot x.re}}}\right)\right)}^{\left(y.re + y.re\right)} \cdot e^{y.re \cdot \log \left(\sqrt[3]{\sqrt{x.re \cdot x.re + x.im \cdot x.im}}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\ \mathbf{if}\;\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + \left(\log x.re \cdot y.re + 1\right) \le 1.0099017536155317:\\ \;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + \left(\log x.re \cdot y.re + 1\right)\\ \mathbf{if}\;\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + \left(\log x.re \cdot y.re + 1\right) \le 1.043536702383335 \cdot 10^{+286}:\\ \;\;\;\;{\left(\log \left(e^{\sqrt[3]{\sqrt{x.im \cdot x.im + x.re \cdot x.re}}}\right)\right)}^{\left(y.re + y.re\right)} \cdot e^{y.re \cdot \log \left(\sqrt[3]{\sqrt{x.re \cdot x.re + x.im \cdot x.im}}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(-x.re\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}}\\ \end{array}\]

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. Split input into 3 regimes
  2. if (+ (* (atan2 x.im x.re) y.im) (+ (* (log x.re) y.re) 1)) < 0.9921358753406202 or 1.0099017536155317 < (+ (* (atan2 x.im x.re) y.im) (+ (* (log x.re) y.re) 1)) < 1.043536702383335e+286

    1. Initial program 31.8

      \[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. Taylor expanded around 0 6.3

      \[\leadsto 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 \color{blue}{1}\]
    3. Applied simplify12.1

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

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

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

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

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

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

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

      \[\leadsto e^{\color{blue}{\left(y.re \cdot \log \left(\sqrt[3]{\sqrt{x.re \cdot x.re + x.im \cdot x.im}} \cdot \sqrt[3]{\sqrt{x.re \cdot x.re + x.im \cdot x.im}}\right) + y.re \cdot \log \left(\sqrt[3]{\sqrt{x.re \cdot x.re + x.im \cdot x.im}}\right)\right)} - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\]
    13. Applied associate--l+6.3

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

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

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

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

    if 0.9921358753406202 < (+ (* (atan2 x.im x.re) y.im) (+ (* (log x.re) y.re) 1)) < 1.0099017536155317

    1. Initial program 37.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 \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. Taylor expanded around 0 38.0

      \[\leadsto 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 \color{blue}{1}\]
    3. Applied simplify38.0

      \[\leadsto \color{blue}{{\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{y.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}}\]
    4. Taylor expanded around 0 14.4

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

    if 1.043536702383335e+286 < (+ (* (atan2 x.im x.re) y.im) (+ (* (log x.re) y.re) 1))

    1. Initial program 31.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 \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. Taylor expanded around 0 17.1

      \[\leadsto 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 \color{blue}{1}\]
    3. Applied simplify21.8

      \[\leadsto \color{blue}{{\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{y.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}}\]
    4. Using strategy rm
    5. Applied add-exp-log21.8

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

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

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

      \[\leadsto e^{\color{blue}{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\]
    9. Taylor expanded around -inf 6.4

      \[\leadsto e^{y.re \cdot \log \color{blue}{\left(-1 \cdot x.re\right)} - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\]
    10. Applied simplify11.8

      \[\leadsto \color{blue}{\frac{{\left(-x.re\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}}}\]
  3. Recombined 3 regimes into one program.

Runtime

Time bar (total: 48.7s)Debug logProfile

herbie shell --seed 2018195 
(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)))))