Average Error: 11.2 → 0.1
Time: 10.2s
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(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}\right) \cdot \frac{{\left(\frac{\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y}} \cdot \sqrt[3]{\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(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}\right) \cdot \frac{{\left(\frac{\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y}} \cdot \sqrt[3]{\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 r365715 = x;
        double r365716 = y;
        double r365717 = r365715 + r365716;
        double r365718 = r365715 / r365717;
        double r365719 = log(r365718);
        double r365720 = r365715 * r365719;
        double r365721 = exp(r365720);
        double r365722 = r365721 / r365715;
        return r365722;
}

double f(double x, double y) {
        double r365723 = x;
        double r365724 = -9.605913011761164e+60;
        bool r365725 = r365723 <= r365724;
        double r365726 = 18.0707144555821;
        bool r365727 = r365723 <= r365726;
        double r365728 = !r365727;
        bool r365729 = r365725 || r365728;
        double r365730 = -1.0;
        double r365731 = y;
        double r365732 = r365730 * r365731;
        double r365733 = exp(r365732);
        double r365734 = r365733 / r365723;
        double r365735 = cbrt(r365723);
        double r365736 = r365723 + r365731;
        double r365737 = cbrt(r365736);
        double r365738 = r365735 / r365737;
        double r365739 = pow(r365738, r365723);
        double r365740 = r365739 * r365739;
        double r365741 = cbrt(r365735);
        double r365742 = r365741 * r365741;
        double r365743 = cbrt(r365737);
        double r365744 = r365743 * r365743;
        double r365745 = r365742 / r365744;
        double r365746 = pow(r365745, r365723);
        double r365747 = r365741 / r365743;
        double r365748 = pow(r365747, r365723);
        double r365749 = r365746 * r365748;
        double r365750 = r365749 / r365723;
        double r365751 = r365740 * r365750;
        double r365752 = r365729 ? r365734 : r365751;
        return r365752;
}

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

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

      \[\leadsto \color{blue}{\left({\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}\right)} \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\]
    14. Using strategy rm
    15. Applied add-cube-cbrt3.3

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

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

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

      \[\leadsto \left({\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}\right) \cdot \frac{\color{blue}{{\left(\frac{\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y}} \cdot \sqrt[3]{\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(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}\right) \cdot \frac{{\left(\frac{\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{\sqrt[3]{x + y}} \cdot \sqrt[3]{\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 +o rules:numerics
(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))