Average Error: 33.3 → 3.0
Time: 8.5s
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^{\left(\sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re} \cdot \sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re}\right) \cdot \sqrt[3]{\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 \mathsf{log1p}\left(\mathsf{expm1}\left(\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)\right)\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^{\left(\sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re} \cdot \sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re}\right) \cdot \sqrt[3]{\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 \mathsf{log1p}\left(\mathsf{expm1}\left(\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)\right)\right)
double f(double x_re, double x_im, double y_re, double y_im) {
        double r18630 = x_re;
        double r18631 = r18630 * r18630;
        double r18632 = x_im;
        double r18633 = r18632 * r18632;
        double r18634 = r18631 + r18633;
        double r18635 = sqrt(r18634);
        double r18636 = log(r18635);
        double r18637 = y_re;
        double r18638 = r18636 * r18637;
        double r18639 = atan2(r18632, r18630);
        double r18640 = y_im;
        double r18641 = r18639 * r18640;
        double r18642 = r18638 - r18641;
        double r18643 = exp(r18642);
        double r18644 = r18636 * r18640;
        double r18645 = r18639 * r18637;
        double r18646 = r18644 + r18645;
        double r18647 = sin(r18646);
        double r18648 = r18643 * r18647;
        return r18648;
}

double f(double x_re, double x_im, double y_re, double y_im) {
        double r18649 = 1.0;
        double r18650 = x_re;
        double r18651 = x_im;
        double r18652 = hypot(r18650, r18651);
        double r18653 = r18649 * r18652;
        double r18654 = log(r18653);
        double r18655 = y_re;
        double r18656 = r18654 * r18655;
        double r18657 = cbrt(r18656);
        double r18658 = r18657 * r18657;
        double r18659 = r18658 * r18657;
        double r18660 = atan2(r18651, r18650);
        double r18661 = y_im;
        double r18662 = r18660 * r18661;
        double r18663 = r18659 - r18662;
        double r18664 = exp(r18663);
        double r18665 = r18654 * r18661;
        double r18666 = r18660 * r18655;
        double r18667 = r18665 + r18666;
        double r18668 = sin(r18667);
        double r18669 = expm1(r18668);
        double r18670 = log1p(r18669);
        double r18671 = r18664 * r18670;
        return r18671;
}

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 *-un-lft-identity33.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 \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.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(\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.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 \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.2

    \[\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 *-un-lft-identity19.2

    \[\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(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. Applied sqrt-prod19.2

    \[\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(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. Simplified19.2

    \[\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(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)\]
  11. Simplified3.0

    \[\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(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)\]
  12. Using strategy rm
  13. Applied add-cube-cbrt3.0

    \[\leadsto e^{\color{blue}{\left(\sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re} \cdot \sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re}\right) \cdot \sqrt[3]{\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(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)\]
  14. Using strategy rm
  15. Applied log1p-expm1-u3.0

    \[\leadsto e^{\left(\sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re} \cdot \sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re}\right) \cdot \sqrt[3]{\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 \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\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)\right)\right)}\]
  16. Final simplification3.0

    \[\leadsto e^{\left(\sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re} \cdot \sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re}\right) \cdot \sqrt[3]{\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 \mathsf{log1p}\left(\mathsf{expm1}\left(\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)\right)\right)\]

Reproduce

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