Average Error: 33.3 → 3.7
Time: 9.8s
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(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\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(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\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 r17001 = x_re;
        double r17002 = r17001 * r17001;
        double r17003 = x_im;
        double r17004 = r17003 * r17003;
        double r17005 = r17002 + r17004;
        double r17006 = sqrt(r17005);
        double r17007 = log(r17006);
        double r17008 = y_re;
        double r17009 = r17007 * r17008;
        double r17010 = atan2(r17003, r17001);
        double r17011 = y_im;
        double r17012 = r17010 * r17011;
        double r17013 = r17009 - r17012;
        double r17014 = exp(r17013);
        double r17015 = r17007 * r17011;
        double r17016 = r17010 * r17008;
        double r17017 = r17015 + r17016;
        double r17018 = sin(r17017);
        double r17019 = r17014 * r17018;
        return r17019;
}

double f(double x_re, double x_im, double y_re, double y_im) {
        double r17020 = 1.0;
        double r17021 = x_re;
        double r17022 = x_im;
        double r17023 = hypot(r17021, r17022);
        double r17024 = r17020 * r17023;
        double r17025 = log(r17024);
        double r17026 = y_re;
        double r17027 = r17025 * r17026;
        double r17028 = atan2(r17022, r17021);
        double r17029 = y_im;
        double r17030 = r17028 * r17029;
        double r17031 = r17027 - r17030;
        double r17032 = exp(r17031);
        double r17033 = log(r17023);
        double r17034 = r17033 * r17029;
        double r17035 = cbrt(r17026);
        double r17036 = r17028 * r17035;
        double r17037 = r17036 * r17035;
        double r17038 = r17037 * r17035;
        double r17039 = r17034 + r17038;
        double r17040 = sin(r17039);
        double r17041 = r17032 * r17040;
        return r17041;
}

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.3

    \[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 hypot-def19.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 \sin \left(\log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)} \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
  4. Using strategy rm
  5. Applied *-un-lft-identity19.3

    \[\leadsto e^{\log \left(\sqrt{\color{blue}{1 \cdot \left(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(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
  6. Applied sqrt-prod19.3

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

    \[\leadsto e^{\log \left(\color{blue}{1} \cdot \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(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\]
  8. Simplified3.5

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

    \[\leadsto e^{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\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)\]
  11. Applied associate-*r*3.7

    \[\leadsto e^{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\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)\]
  12. Using strategy rm
  13. Applied associate-*r*3.7

    \[\leadsto e^{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\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)\]
  14. Final simplification3.7

    \[\leadsto e^{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\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 2020089 +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)))))