Average Error: 11.3 → 0.1
Time: 13.4s
Precision: 64
\[\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -12624443392610811608382722060339625590780 \lor \neg \left(x \le 15.93322363967515542526598437689244747162\right):\\ \;\;\;\;\frac{\sqrt{e^{-y}}}{\frac{x}{\sqrt{e^{-y}}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\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 {\left(\frac{\sqrt[3]{x}}{\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 -12624443392610811608382722060339625590780 \lor \neg \left(x \le 15.93322363967515542526598437689244747162\right):\\
\;\;\;\;\frac{\sqrt{e^{-y}}}{\frac{x}{\sqrt{e^{-y}}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\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 {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\

\end{array}
double f(double x, double y) {
        double r503000 = x;
        double r503001 = y;
        double r503002 = r503000 + r503001;
        double r503003 = r503000 / r503002;
        double r503004 = log(r503003);
        double r503005 = r503000 * r503004;
        double r503006 = exp(r503005);
        double r503007 = r503006 / r503000;
        return r503007;
}

double f(double x, double y) {
        double r503008 = x;
        double r503009 = -1.2624443392610812e+40;
        bool r503010 = r503008 <= r503009;
        double r503011 = 15.933223639675155;
        bool r503012 = r503008 <= r503011;
        double r503013 = !r503012;
        bool r503014 = r503010 || r503013;
        double r503015 = y;
        double r503016 = -r503015;
        double r503017 = exp(r503016);
        double r503018 = sqrt(r503017);
        double r503019 = r503008 / r503018;
        double r503020 = r503018 / r503019;
        double r503021 = cbrt(r503008);
        double r503022 = r503008 + r503015;
        double r503023 = cbrt(r503022);
        double r503024 = r503021 / r503023;
        double r503025 = pow(r503024, r503008);
        double r503026 = r503025 * r503025;
        double r503027 = r503026 * r503025;
        double r503028 = r503027 / r503008;
        double r503029 = r503014 ? r503020 : r503028;
        return r503029;
}

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
Target7.5
Herbie0.1
\[\begin{array}{l} \mathbf{if}\;y \lt -3.73118442066479561492798134439269393419 \cdot 10^{94}:\\ \;\;\;\;\frac{e^{\frac{-1}{y}}}{x}\\ \mathbf{elif}\;y \lt 28179592427282878868860376020282245120:\\ \;\;\;\;\frac{{\left(\frac{x}{y + x}\right)}^{x}}{x}\\ \mathbf{elif}\;y \lt 2.347387415166997963747840232163110922613 \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 < -1.2624443392610812e+40 or 15.933223639675155 < x

    1. Initial program 11.0

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

      \[\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. Using strategy rm
    5. Applied add-sqr-sqrt0.1

      \[\leadsto \frac{\color{blue}{\sqrt{e^{-y}} \cdot \sqrt{e^{-y}}}}{x}\]
    6. Applied associate-/l*0.1

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

    if -1.2624443392610812e+40 < x < 15.933223639675155

    1. Initial program 11.6

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

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

      \[\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.6

      \[\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.6

      \[\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.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}}}{x}\]
    8. Using strategy rm
    9. Applied times-frac2.3

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

      \[\leadsto \frac{\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 {\left(\frac{\sqrt[3]{x}}{\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 -12624443392610811608382722060339625590780 \lor \neg \left(x \le 15.93322363967515542526598437689244747162\right):\\ \;\;\;\;\frac{\sqrt{e^{-y}}}{\frac{x}{\sqrt{e^{-y}}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\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 {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\ \end{array}\]

Reproduce

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