Average Error: 33.5 → 5.6
Time: 54.1s
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)\]
\[\begin{array}{l} \mathbf{if}\;\sin \left((y.im \cdot \left(\log \left(\sqrt{x.re^2 + x.im^2}^*\right)\right) + \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right))_*\right) \cdot \frac{{\left(\sqrt{x.re^2 + x.im^2}^*\right)}^{y.re}}{1 + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + \frac{1}{2} \cdot \left({\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}^{2} \cdot {y.im}^{2}\right)\right)} \le -3.7995546046766 \cdot 10^{-310}:\\ \;\;\;\;\sin \left((y.im \cdot \left(\log \left(\sqrt{x.re^2 + x.im^2}^*\right)\right) + \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right))_*\right) \cdot \frac{{\left(\sqrt{x.re^2 + x.im^2}^*\right)}^{y.re}}{(e^{\log_* (1 + {\left(\sqrt[3]{e^{y.im}} \cdot \sqrt[3]{e^{y.im}}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)})} - 1)^* \cdot (e^{\log_* (1 + {\left(\sqrt[3]{e^{y.im}}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)})} - 1)^*}\\ \mathbf{if}\;\sin \left((y.im \cdot \left(\log \left(\sqrt{x.re^2 + x.im^2}^*\right)\right) + \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right))_*\right) \cdot \frac{{\left(\sqrt{x.re^2 + x.im^2}^*\right)}^{y.re}}{1 + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + \frac{1}{2} \cdot \left({\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}^{2} \cdot {y.im}^{2}\right)\right)} \le 5.04453420843053 \cdot 10^{-310}:\\ \;\;\;\;\sin \left((y.im \cdot \left(\log \left(\sqrt{x.re^2 + x.im^2}^*\right)\right) + \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right))_*\right) \cdot \frac{{\left(\sqrt{x.re^2 + x.im^2}^*\right)}^{y.re}}{1 + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + \frac{1}{2} \cdot \left({\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}^{2} \cdot {y.im}^{2}\right)\right)}\\ \mathbf{if}\;\sin \left((y.im \cdot \left(\log \left(\sqrt{x.re^2 + x.im^2}^*\right)\right) + \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right))_*\right) \cdot \frac{{\left(\sqrt{x.re^2 + x.im^2}^*\right)}^{y.re}}{1 + \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + \frac{1}{2} \cdot \left({\left(\tan^{-1}_* \frac{x.im}{x.re}\right)}^{2} \cdot {y.im}^{2}\right)\right)} \le 5.1933809191100916 \cdot 10^{+269}:\\ \;\;\;\;\sin \left((y.im \cdot \left(\log \left(\sqrt{x.re^2 + x.im^2}^*\right)\right) + \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right))_*\right) \cdot \frac{{\left(\sqrt{x.re^2 + x.im^2}^*\right)}^{y.re}}{(e^{\log_* (1 + {\left(\sqrt[3]{e^{y.im}} \cdot \sqrt[3]{e^{y.im}}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)})} - 1)^* \cdot (e^{\log_* (1 + {\left(\sqrt[3]{e^{y.im}}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re}\right)})} - 1)^*}\\ \mathbf{else}:\\ \;\;\;\;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)\\ \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 3 regimes
  2. if (* (sin (fma y.im (log (hypot x.re x.im)) (* y.re (atan2 x.im x.re)))) (/ (pow (hypot x.re x.im) y.re) (+ 1 (+ (* (atan2 x.im x.re) y.im) (* 1/2 (* (pow (atan2 x.im x.re) 2) (pow y.im 2))))))) < -3.7995546046766e-310 or 5.04453420843053e-310 < (* (sin (fma y.im (log (hypot x.re x.im)) (* y.re (atan2 x.im x.re)))) (/ (pow (hypot x.re x.im) y.re) (+ 1 (+ (* (atan2 x.im x.re) y.im) (* 1/2 (* (pow (atan2 x.im x.re) 2) (pow y.im 2))))))) < 5.1933809191100916e+269

    1. Initial program 34.2

      \[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 simplify5.3

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

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

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

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

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

    if -3.7995546046766e-310 < (* (sin (fma y.im (log (hypot x.re x.im)) (* y.re (atan2 x.im x.re)))) (/ (pow (hypot x.re x.im) y.re) (+ 1 (+ (* (atan2 x.im x.re) y.im) (* 1/2 (* (pow (atan2 x.im x.re) 2) (pow y.im 2))))))) < 5.04453420843053e-310

    1. Initial program 31.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 simplify6.9

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

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

    if 5.1933809191100916e+269 < (* (sin (fma y.im (log (hypot x.re x.im)) (* y.re (atan2 x.im x.re)))) (/ (pow (hypot x.re x.im) y.re) (+ 1 (+ (* (atan2 x.im x.re) y.im) (* 1/2 (* (pow (atan2 x.im x.re) 2) (pow y.im 2)))))))

    1. Initial program 39.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 \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)\]
  3. Recombined 3 regimes into one program.

Runtime

Time bar (total: 54.1s)Debug logProfile

herbie shell --seed 2020178 +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)))))