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

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

\end{array}
double f(double x, double y) {
        double r499249 = x;
        double r499250 = y;
        double r499251 = r499249 + r499250;
        double r499252 = r499249 / r499251;
        double r499253 = log(r499252);
        double r499254 = r499249 * r499253;
        double r499255 = exp(r499254);
        double r499256 = r499255 / r499249;
        return r499256;
}

double f(double x, double y) {
        double r499257 = x;
        double r499258 = -7.1506444135661775;
        bool r499259 = r499257 <= r499258;
        double r499260 = 6.441277885744034;
        bool r499261 = r499257 <= r499260;
        double r499262 = !r499261;
        bool r499263 = r499259 || r499262;
        double r499264 = y;
        double r499265 = -r499264;
        double r499266 = exp(r499265);
        double r499267 = r499266 / r499257;
        double r499268 = cbrt(r499257);
        double r499269 = r499257 + r499264;
        double r499270 = cbrt(r499269);
        double r499271 = r499268 / r499270;
        double r499272 = fabs(r499271);
        double r499273 = pow(r499272, r499257);
        double r499274 = r499273 * r499273;
        double r499275 = r499268 * r499268;
        double r499276 = r499274 / r499275;
        double r499277 = pow(r499271, r499257);
        double r499278 = r499277 / r499268;
        double r499279 = r499276 * r499278;
        double r499280 = r499263 ? r499267 : r499279;
        return r499280;
}

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
Herbie0.7
\[\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 < -7.1506444135661775 or 6.441277885744034 < x

    1. Initial program 10.9

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

      \[\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}\]

    if -7.1506444135661775 < x < 6.441277885744034

    1. Initial program 11.7

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

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

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

      \[\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}}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}\]
    6. Applied add-cube-cbrt12.8

      \[\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}}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}\]
    7. Applied times-frac12.8

      \[\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}}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}\]
    8. Applied unpow-prod-down4.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}}}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}\]
    9. Applied times-frac4.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}}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{\sqrt[3]{x}}}\]
    10. Using strategy rm
    11. Applied add-sqr-sqrt4.0

      \[\leadsto \frac{{\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}}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{\sqrt[3]{x}}\]
    12. Applied unpow-prod-down4.0

      \[\leadsto \frac{\color{blue}{{\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}}}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{\sqrt[3]{x}}\]
    13. Simplified4.0

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

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

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

Reproduce

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