Average Error: 11.2 → 0.1
Time: 8.7s
Precision: 64
\[\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -9.6059130117611643 \cdot 10^{60} \lor \neg \left(x \le 18.070714455582099\right):\\ \;\;\;\;\frac{e^{-1 \cdot y}}{x}\\ \mathbf{else}:\\ \;\;\;\;\left({\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)} \cdot {\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)}\right) \cdot \frac{{\left(\frac{\sqrt[3]{\sqrt[3]{x} \cdot \sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y}}}\right)}^{x}}{x}\\ \end{array}\]
\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}
\begin{array}{l}
\mathbf{if}\;x \le -9.6059130117611643 \cdot 10^{60} \lor \neg \left(x \le 18.070714455582099\right):\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\

\mathbf{else}:\\
\;\;\;\;\left({\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)} \cdot {\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)}\right) \cdot \frac{{\left(\frac{\sqrt[3]{\sqrt[3]{x} \cdot \sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y}}}\right)}^{x}}{x}\\

\end{array}
double f(double x, double y) {
        double r418856 = x;
        double r418857 = y;
        double r418858 = r418856 + r418857;
        double r418859 = r418856 / r418858;
        double r418860 = log(r418859);
        double r418861 = r418856 * r418860;
        double r418862 = exp(r418861);
        double r418863 = r418862 / r418856;
        return r418863;
}

double f(double x, double y) {
        double r418864 = x;
        double r418865 = -9.605913011761164e+60;
        bool r418866 = r418864 <= r418865;
        double r418867 = 18.0707144555821;
        bool r418868 = r418864 <= r418867;
        double r418869 = !r418868;
        bool r418870 = r418866 || r418869;
        double r418871 = -1.0;
        double r418872 = y;
        double r418873 = r418871 * r418872;
        double r418874 = exp(r418873);
        double r418875 = r418874 / r418864;
        double r418876 = cbrt(r418864);
        double r418877 = r418864 + r418872;
        double r418878 = cbrt(r418877);
        double r418879 = r418876 / r418878;
        double r418880 = fabs(r418879);
        double r418881 = 2.0;
        double r418882 = r418864 / r418881;
        double r418883 = r418881 * r418882;
        double r418884 = pow(r418880, r418883);
        double r418885 = r418884 * r418884;
        double r418886 = r418876 * r418876;
        double r418887 = cbrt(r418886);
        double r418888 = r418878 * r418878;
        double r418889 = cbrt(r418888);
        double r418890 = r418887 / r418889;
        double r418891 = pow(r418890, r418864);
        double r418892 = cbrt(r418876);
        double r418893 = cbrt(r418878);
        double r418894 = r418892 / r418893;
        double r418895 = pow(r418894, r418864);
        double r418896 = r418891 * r418895;
        double r418897 = r418896 / r418864;
        double r418898 = r418885 * r418897;
        double r418899 = r418870 ? r418875 : r418898;
        return r418899;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original11.2
Target7.6
Herbie0.1
\[\begin{array}{l} \mathbf{if}\;y \lt -3.73118442066479561 \cdot 10^{94}:\\ \;\;\;\;\frac{e^{\frac{-1}{y}}}{x}\\ \mathbf{elif}\;y \lt 2.81795924272828789 \cdot 10^{37}:\\ \;\;\;\;\frac{{\left(\frac{x}{y + x}\right)}^{x}}{x}\\ \mathbf{elif}\;y \lt 2.347387415166998 \cdot 10^{178}:\\ \;\;\;\;\log \left(e^{\frac{{\left(\frac{x}{y + x}\right)}^{x}}{x}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{\frac{-1}{y}}}{x}\\ \end{array}\]

Derivation

  1. Split input into 2 regimes
  2. if x < -9.605913011761164e+60 or 18.0707144555821 < x

    1. Initial program 12.3

      \[\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\]
    2. Simplified12.3

      \[\leadsto \color{blue}{\frac{{\left(\frac{x}{x + y}\right)}^{x}}{x}}\]
    3. Taylor expanded around inf 0.0

      \[\leadsto \frac{\color{blue}{e^{-y}}}{x}\]
    4. Simplified0.0

      \[\leadsto \frac{\color{blue}{e^{-1 \cdot y}}}{x}\]

    if -9.605913011761164e+60 < x < 18.0707144555821

    1. Initial program 10.1

      \[\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\]
    2. Simplified10.1

      \[\leadsto \color{blue}{\frac{{\left(\frac{x}{x + y}\right)}^{x}}{x}}\]
    3. Using strategy rm
    4. Applied *-un-lft-identity10.1

      \[\leadsto \frac{{\left(\frac{x}{x + y}\right)}^{x}}{\color{blue}{1 \cdot x}}\]
    5. Applied add-cube-cbrt13.1

      \[\leadsto \frac{{\left(\frac{x}{\color{blue}{\left(\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}\right) \cdot \sqrt[3]{x + y}}}\right)}^{x}}{1 \cdot x}\]
    6. Applied add-cube-cbrt10.1

      \[\leadsto \frac{{\left(\frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}\right) \cdot \sqrt[3]{x + y}}\right)}^{x}}{1 \cdot x}\]
    7. Applied times-frac10.1

      \[\leadsto \frac{{\color{blue}{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}} \cdot \frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}}^{x}}{1 \cdot x}\]
    8. Applied unpow-prod-down2.3

      \[\leadsto \frac{\color{blue}{{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}{1 \cdot x}\]
    9. Applied times-frac2.4

      \[\leadsto \color{blue}{\frac{{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}\right)}^{x}}{1} \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}}\]
    10. Simplified2.4

      \[\leadsto \color{blue}{{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}\right)}^{x}} \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\]
    11. Using strategy rm
    12. Applied add-sqr-sqrt2.4

      \[\leadsto {\color{blue}{\left(\sqrt{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}} \cdot \sqrt{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}}\right)}}^{x} \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\]
    13. Applied unpow-prod-down2.4

      \[\leadsto \color{blue}{\left({\left(\sqrt{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}}\right)}^{x} \cdot {\left(\sqrt{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}}\right)}^{x}\right)} \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\]
    14. Simplified2.4

      \[\leadsto \left(\color{blue}{{\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)}} \cdot {\left(\sqrt{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}}\right)}^{x}\right) \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\]
    15. Simplified0.2

      \[\leadsto \left({\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)} \cdot \color{blue}{{\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)}}\right) \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\]
    16. Using strategy rm
    17. Applied add-cube-cbrt1.3

      \[\leadsto \left({\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)} \cdot {\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)}\right) \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{\color{blue}{\left(\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}\right) \cdot \sqrt[3]{x + y}}}}\right)}^{x}}{x}\]
    18. Applied cbrt-prod2.4

      \[\leadsto \left({\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)} \cdot {\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)}\right) \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\color{blue}{\sqrt[3]{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}} \cdot \sqrt[3]{\sqrt[3]{x + y}}}}\right)}^{x}}{x}\]
    19. Applied add-cube-cbrt2.6

      \[\leadsto \left({\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)} \cdot {\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)}\right) \cdot \frac{{\left(\frac{\sqrt[3]{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}}{\sqrt[3]{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}} \cdot \sqrt[3]{\sqrt[3]{x + y}}}\right)}^{x}}{x}\]
    20. Applied cbrt-prod0.2

      \[\leadsto \left({\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)} \cdot {\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)}\right) \cdot \frac{{\left(\frac{\color{blue}{\sqrt[3]{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}}}{\sqrt[3]{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}} \cdot \sqrt[3]{\sqrt[3]{x + y}}}\right)}^{x}}{x}\]
    21. Applied times-frac0.2

      \[\leadsto \left({\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)} \cdot {\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)}\right) \cdot \frac{{\color{blue}{\left(\frac{\sqrt[3]{\sqrt[3]{x} \cdot \sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}} \cdot \frac{\sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y}}}\right)}}^{x}}{x}\]
    22. Applied unpow-prod-down0.2

      \[\leadsto \left({\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)} \cdot {\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)}\right) \cdot \frac{\color{blue}{{\left(\frac{\sqrt[3]{\sqrt[3]{x} \cdot \sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y}}}\right)}^{x}}}{x}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -9.6059130117611643 \cdot 10^{60} \lor \neg \left(x \le 18.070714455582099\right):\\ \;\;\;\;\frac{e^{-1 \cdot y}}{x}\\ \mathbf{else}:\\ \;\;\;\;\left({\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)} \cdot {\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{\left(2 \cdot \frac{x}{2}\right)}\right) \cdot \frac{{\left(\frac{\sqrt[3]{\sqrt[3]{x} \cdot \sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y}}}\right)}^{x}}{x}\\ \end{array}\]

Reproduce

herbie shell --seed 2020036 
(FPCore (x y)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
  :precision binary64

  :herbie-target
  (if (< y -3.7311844206647956e+94) (/ (exp (/ -1 y)) x) (if (< y 2.817959242728288e+37) (/ (pow (/ x (+ y x)) x) x) (if (< y 2.347387415166998e+178) (log (exp (/ (pow (/ x (+ y x)) x) x))) (/ (exp (/ -1 y)) x))))

  (/ (exp (* x (log (/ x (+ x y))))) x))