\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -6855000109145468998274891760271360:\\
\;\;\;\;\sqrt{e^{-y}} \cdot \frac{\sqrt{e^{-y}}}{x}\\
\mathbf{elif}\;x \le 51.97466445904304066516488092020153999329:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}}{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\sqrt{e^{-y}}} \cdot \frac{{\left(\sqrt{\sqrt{e^{-y}}}\right)}^{3}}{x}\\
\end{array}double f(double x, double y) {
double r241335 = x;
double r241336 = y;
double r241337 = r241335 + r241336;
double r241338 = r241335 / r241337;
double r241339 = log(r241338);
double r241340 = r241335 * r241339;
double r241341 = exp(r241340);
double r241342 = r241341 / r241335;
return r241342;
}
double f(double x, double y) {
double r241343 = x;
double r241344 = -6.855000109145469e+33;
bool r241345 = r241343 <= r241344;
double r241346 = y;
double r241347 = -r241346;
double r241348 = exp(r241347);
double r241349 = sqrt(r241348);
double r241350 = r241349 / r241343;
double r241351 = r241349 * r241350;
double r241352 = 51.97466445904304;
bool r241353 = r241343 <= r241352;
double r241354 = 2.0;
double r241355 = cbrt(r241343);
double r241356 = r241343 + r241346;
double r241357 = cbrt(r241356);
double r241358 = r241355 / r241357;
double r241359 = log(r241358);
double r241360 = r241354 * r241359;
double r241361 = r241343 * r241360;
double r241362 = r241343 * r241359;
double r241363 = r241361 + r241362;
double r241364 = exp(r241363);
double r241365 = r241364 / r241343;
double r241366 = sqrt(r241349);
double r241367 = 3.0;
double r241368 = pow(r241366, r241367);
double r241369 = r241368 / r241343;
double r241370 = r241366 * r241369;
double r241371 = r241353 ? r241365 : r241370;
double r241372 = r241345 ? r241351 : r241371;
return r241372;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.5 |
|---|---|
| Target | 8.2 |
| Herbie | 0.1 |
if x < -6.855000109145469e+33Initial program 12.4
Taylor expanded around inf 0.0
Simplified0.0
rmApplied *-un-lft-identity0.0
Applied add-sqr-sqrt0.1
Applied times-frac0.1
Simplified0.1
if -6.855000109145469e+33 < x < 51.97466445904304Initial program 11.8
rmApplied add-cube-cbrt13.3
Applied add-cube-cbrt11.8
Applied times-frac11.8
Applied log-prod2.7
Applied distribute-lft-in2.7
Simplified0.1
if 51.97466445904304 < x Initial program 10.4
Taylor expanded around inf 0.1
Simplified0.1
rmApplied *-un-lft-identity0.1
Applied add-sqr-sqrt0.1
Applied times-frac0.1
Simplified0.1
rmApplied add-sqr-sqrt0.1
Applied sqrt-prod0.1
Applied associate-*l*0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2019322
(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))