Average Error: 11.3 → 1.0
Time: 7.6s
Precision: 64
\[\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -34762.528692470238 \lor \neg \left(x \le 25.356729299496507\right):\\ \;\;\;\;\frac{1}{x \cdot e^{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}\right)}^{x}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\\ \end{array}\]
\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}
\begin{array}{l}
\mathbf{if}\;x \le -34762.528692470238 \lor \neg \left(x \le 25.356729299496507\right):\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\

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

\end{array}
double f(double x, double y) {
        double r431636 = x;
        double r431637 = y;
        double r431638 = r431636 + r431637;
        double r431639 = r431636 / r431638;
        double r431640 = log(r431639);
        double r431641 = r431636 * r431640;
        double r431642 = exp(r431641);
        double r431643 = r431642 / r431636;
        return r431643;
}

double f(double x, double y) {
        double r431644 = x;
        double r431645 = -34762.52869247024;
        bool r431646 = r431644 <= r431645;
        double r431647 = 25.356729299496507;
        bool r431648 = r431644 <= r431647;
        double r431649 = !r431648;
        bool r431650 = r431646 || r431649;
        double r431651 = 1.0;
        double r431652 = y;
        double r431653 = exp(r431652);
        double r431654 = r431644 * r431653;
        double r431655 = r431651 / r431654;
        double r431656 = cbrt(r431644);
        double r431657 = r431656 * r431656;
        double r431658 = r431644 + r431652;
        double r431659 = cbrt(r431658);
        double r431660 = r431659 * r431659;
        double r431661 = r431657 / r431660;
        double r431662 = pow(r431661, r431644);
        double r431663 = r431656 / r431659;
        double r431664 = pow(r431663, r431644);
        double r431665 = r431644 / r431664;
        double r431666 = r431662 / r431665;
        double r431667 = r431650 ? r431655 : r431666;
        return r431667;
}

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.3
Target8.2
Herbie1.0
\[\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 < -34762.52869247024 or 25.356729299496507 < x

    1. Initial program 11.3

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

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

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

      \[\leadsto \frac{\color{blue}{e^{-1 \cdot y}}}{x}\]
    5. Using strategy rm
    6. Applied clear-num0.1

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

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

    if -34762.52869247024 < x < 25.356729299496507

    1. Initial program 11.4

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

      \[\leadsto \color{blue}{\frac{{\left(\frac{x}{x + y}\right)}^{x}}{x}}\]
    3. Using strategy rm
    4. Applied add-cube-cbrt11.5

      \[\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}}{x}\]
    5. Applied add-cube-cbrt11.4

      \[\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}}{x}\]
    6. Applied times-frac11.4

      \[\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}}{x}\]
    7. Applied unpow-prod-down2.0

      \[\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}}}{x}\]
    8. Applied associate-/l*2.0

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

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

Reproduce

herbie shell --seed 2020064 
(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))