\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -33968180357.561458587646484375:\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\mathbf{elif}\;x \le 0.02388541996603257139275555687163432594389:\\
\;\;\;\;\frac{e^{x \cdot 0}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\end{array}double f(double x, double y) {
double r429948 = x;
double r429949 = y;
double r429950 = r429948 + r429949;
double r429951 = r429948 / r429950;
double r429952 = log(r429951);
double r429953 = r429948 * r429952;
double r429954 = exp(r429953);
double r429955 = r429954 / r429948;
return r429955;
}
double f(double x, double y) {
double r429956 = x;
double r429957 = -33968180357.56146;
bool r429958 = r429956 <= r429957;
double r429959 = -1.0;
double r429960 = y;
double r429961 = r429959 * r429960;
double r429962 = exp(r429961);
double r429963 = r429962 / r429956;
double r429964 = 0.02388541996603257;
bool r429965 = r429956 <= r429964;
double r429966 = 0.0;
double r429967 = r429956 * r429966;
double r429968 = exp(r429967);
double r429969 = r429968 / r429956;
double r429970 = 1.0;
double r429971 = exp(r429960);
double r429972 = r429956 * r429971;
double r429973 = r429970 / r429972;
double r429974 = r429965 ? r429969 : r429973;
double r429975 = r429958 ? r429963 : r429974;
return r429975;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.8 |
|---|---|
| Target | 8.0 |
| Herbie | 0.4 |
if x < -33968180357.56146Initial program 11.8
Taylor expanded around inf 0.0
if -33968180357.56146 < x < 0.02388541996603257Initial program 10.9
Taylor expanded around inf 0.7
if 0.02388541996603257 < x Initial program 9.6
Taylor expanded around inf 0.1
rmApplied clear-num0.1
Simplified0.1
Final simplification0.4
herbie shell --seed 2019356
(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))