Average Error: 33.0 → 3.8
Time: 6.7s
Precision: 64
\[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)\]
\[e^{\log \left(e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \left(\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \sqrt[3]{y.re}\right) \cdot \sqrt[3]{y.re}\right) \cdot \sqrt[3]{y.re}\right)\]
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)
e^{\log \left(e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \left(\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \sqrt[3]{y.re}\right) \cdot \sqrt[3]{y.re}\right) \cdot \sqrt[3]{y.re}\right)
double f(double x_re, double x_im, double y_re, double y_im) {
        double r15721 = x_re;
        double r15722 = r15721 * r15721;
        double r15723 = x_im;
        double r15724 = r15723 * r15723;
        double r15725 = r15722 + r15724;
        double r15726 = sqrt(r15725);
        double r15727 = log(r15726);
        double r15728 = y_re;
        double r15729 = r15727 * r15728;
        double r15730 = atan2(r15723, r15721);
        double r15731 = y_im;
        double r15732 = r15730 * r15731;
        double r15733 = r15729 - r15732;
        double r15734 = exp(r15733);
        double r15735 = r15727 * r15731;
        double r15736 = r15730 * r15728;
        double r15737 = r15735 + r15736;
        double r15738 = sin(r15737);
        double r15739 = r15734 * r15738;
        return r15739;
}

double f(double x_re, double x_im, double y_re, double y_im) {
        double r15740 = x_re;
        double r15741 = x_im;
        double r15742 = hypot(r15740, r15741);
        double r15743 = log(r15742);
        double r15744 = exp(r15743);
        double r15745 = log(r15744);
        double r15746 = y_re;
        double r15747 = r15745 * r15746;
        double r15748 = atan2(r15741, r15740);
        double r15749 = y_im;
        double r15750 = r15748 * r15749;
        double r15751 = r15747 - r15750;
        double r15752 = exp(r15751);
        double r15753 = 1.0;
        double r15754 = r15753 * r15742;
        double r15755 = log(r15754);
        double r15756 = r15755 * r15749;
        double r15757 = cbrt(r15746);
        double r15758 = r15748 * r15757;
        double r15759 = r15758 * r15757;
        double r15760 = r15759 * r15757;
        double r15761 = r15756 + r15760;
        double r15762 = sin(r15761);
        double r15763 = r15752 * r15762;
        return r15763;
}

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. Using strategy rm
  3. Applied *-un-lft-identity33.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 \sin \left(\log \left(\sqrt{\color{blue}{1 \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)}}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
  4. Applied sqrt-prod33.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 \sin \left(\log \color{blue}{\left(\sqrt{1} \cdot \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)\]
  5. Simplified33.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 \sin \left(\log \left(\color{blue}{1} \cdot \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)\]
  6. Simplified19.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 \sin \left(\log \left(1 \cdot \color{blue}{\mathsf{hypot}\left(x.re, x.im\right)}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
  7. Using strategy rm
  8. Applied add-exp-log19.0

    \[\leadsto e^{\log \color{blue}{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
  9. Simplified3.6

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

    \[\leadsto e^{\log \left(e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot \color{blue}{\left(\left(\sqrt[3]{y.re} \cdot \sqrt[3]{y.re}\right) \cdot \sqrt[3]{y.re}\right)}\right)\]
  12. Applied associate-*r*3.8

    \[\leadsto e^{\log \left(e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(\sqrt[3]{y.re} \cdot \sqrt[3]{y.re}\right)\right) \cdot \sqrt[3]{y.re}}\right)\]
  13. Using strategy rm
  14. Applied associate-*r*3.8

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

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

Reproduce

herbie shell --seed 2020021 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
  :name "powComplex, imaginary part"
  :precision binary64
  (* (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)))))