Average Error: 11.2 → 0.1
Time: 8.1s
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}:\\ \;\;\;\;\frac{e^{\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) \cdot x}}{\frac{x}{{\left(\sqrt[3]{\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}} \cdot \sqrt[3]{\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}}\right)}^{x} \cdot {\left(\sqrt[3]{\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 -9.6059130117611643 \cdot 10^{60} \lor \neg \left(x \le 18.070714455582099\right):\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\

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

\end{array}
double f(double x, double y) {
        double r356486 = x;
        double r356487 = y;
        double r356488 = r356486 + r356487;
        double r356489 = r356486 / r356488;
        double r356490 = log(r356489);
        double r356491 = r356486 * r356490;
        double r356492 = exp(r356491);
        double r356493 = r356492 / r356486;
        return r356493;
}

double f(double x, double y) {
        double r356494 = x;
        double r356495 = -9.605913011761164e+60;
        bool r356496 = r356494 <= r356495;
        double r356497 = 18.0707144555821;
        bool r356498 = r356494 <= r356497;
        double r356499 = !r356498;
        bool r356500 = r356496 || r356499;
        double r356501 = -1.0;
        double r356502 = y;
        double r356503 = r356501 * r356502;
        double r356504 = exp(r356503);
        double r356505 = r356504 / r356494;
        double r356506 = 2.0;
        double r356507 = cbrt(r356494);
        double r356508 = r356494 + r356502;
        double r356509 = cbrt(r356508);
        double r356510 = r356507 / r356509;
        double r356511 = log(r356510);
        double r356512 = r356506 * r356511;
        double r356513 = r356512 * r356494;
        double r356514 = exp(r356513);
        double r356515 = cbrt(r356510);
        double r356516 = r356515 * r356515;
        double r356517 = pow(r356516, r356494);
        double r356518 = pow(r356515, r356494);
        double r356519 = r356517 * r356518;
        double r356520 = r356494 / r356519;
        double r356521 = r356514 / r356520;
        double r356522 = r356500 ? r356505 : r356521;
        return r356522;
}

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 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}}{x}\]
    5. 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}}{x}\]
    6. 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}}{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. Applied associate-/l*2.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}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}}\]
    9. Using strategy rm
    10. Applied add-exp-log36.0

      \[\leadsto \frac{{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + y} \cdot \color{blue}{e^{\log \left(\sqrt[3]{x + y}\right)}}}\right)}^{x}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\]
    11. Applied add-exp-log36.0

      \[\leadsto \frac{{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\color{blue}{e^{\log \left(\sqrt[3]{x + y}\right)}} \cdot e^{\log \left(\sqrt[3]{x + y}\right)}}\right)}^{x}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\]
    12. Applied prod-exp36.0

      \[\leadsto \frac{{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\color{blue}{e^{\log \left(\sqrt[3]{x + y}\right) + \log \left(\sqrt[3]{x + y}\right)}}}\right)}^{x}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\]
    13. Applied add-exp-log36.0

      \[\leadsto \frac{{\left(\frac{\sqrt[3]{x} \cdot \color{blue}{e^{\log \left(\sqrt[3]{x}\right)}}}{e^{\log \left(\sqrt[3]{x + y}\right) + \log \left(\sqrt[3]{x + y}\right)}}\right)}^{x}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\]
    14. Applied add-exp-log36.0

      \[\leadsto \frac{{\left(\frac{\color{blue}{e^{\log \left(\sqrt[3]{x}\right)}} \cdot e^{\log \left(\sqrt[3]{x}\right)}}{e^{\log \left(\sqrt[3]{x + y}\right) + \log \left(\sqrt[3]{x + y}\right)}}\right)}^{x}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\]
    15. Applied prod-exp36.0

      \[\leadsto \frac{{\left(\frac{\color{blue}{e^{\log \left(\sqrt[3]{x}\right) + \log \left(\sqrt[3]{x}\right)}}}{e^{\log \left(\sqrt[3]{x + y}\right) + \log \left(\sqrt[3]{x + y}\right)}}\right)}^{x}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\]
    16. Applied div-exp36.0

      \[\leadsto \frac{{\color{blue}{\left(e^{\left(\log \left(\sqrt[3]{x}\right) + \log \left(\sqrt[3]{x}\right)\right) - \left(\log \left(\sqrt[3]{x + y}\right) + \log \left(\sqrt[3]{x + y}\right)\right)}\right)}}^{x}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\]
    17. Applied pow-exp34.9

      \[\leadsto \frac{\color{blue}{e^{\left(\left(\log \left(\sqrt[3]{x}\right) + \log \left(\sqrt[3]{x}\right)\right) - \left(\log \left(\sqrt[3]{x + y}\right) + \log \left(\sqrt[3]{x + y}\right)\right)\right) \cdot x}}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\]
    18. Simplified0.2

      \[\leadsto \frac{e^{\color{blue}{\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) \cdot x}}}{\frac{x}{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}}\]
    19. Using strategy rm
    20. Applied add-cube-cbrt0.2

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

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