\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 167.998095920773977 \lor \neg \left(y \le 3.00059535462789803 \cdot 10^{87}\right):\\
\;\;\;\;\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}:\\
\;\;\;\;\frac{e^{x \cdot \log \left(\frac{1}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}} \cdot \frac{x}{\sqrt[3]{x + y}}\right)}}{x}\\
\end{array}double f(double x, double y) {
double r2178 = x;
double r2179 = y;
double r2180 = r2178 + r2179;
double r2181 = r2178 / r2180;
double r2182 = log(r2181);
double r2183 = r2178 * r2182;
double r2184 = exp(r2183);
double r2185 = r2184 / r2178;
return r2185;
}
double f(double x, double y) {
double r2186 = y;
double r2187 = 167.99809592077398;
bool r2188 = r2186 <= r2187;
double r2189 = 3.000595354627898e+87;
bool r2190 = r2186 <= r2189;
double r2191 = !r2190;
bool r2192 = r2188 || r2191;
double r2193 = x;
double r2194 = 2.0;
double r2195 = cbrt(r2193);
double r2196 = r2193 + r2186;
double r2197 = cbrt(r2196);
double r2198 = r2195 / r2197;
double r2199 = log(r2198);
double r2200 = r2194 * r2199;
double r2201 = r2193 * r2200;
double r2202 = r2193 * r2199;
double r2203 = r2201 + r2202;
double r2204 = exp(r2203);
double r2205 = r2204 / r2193;
double r2206 = 1.0;
double r2207 = r2197 * r2197;
double r2208 = r2206 / r2207;
double r2209 = r2193 / r2197;
double r2210 = r2208 * r2209;
double r2211 = log(r2210);
double r2212 = r2193 * r2211;
double r2213 = exp(r2212);
double r2214 = r2213 / r2193;
double r2215 = r2192 ? r2205 : r2214;
return r2215;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.3 |
|---|---|
| Target | 8.4 |
| Herbie | 5.0 |
if y < 167.99809592077398 or 3.000595354627898e+87 < y Initial program 9.2
rmApplied add-cube-cbrt28.7
Applied add-cube-cbrt9.2
Applied times-frac9.2
Applied log-prod4.5
Applied distribute-lft-in4.5
Simplified3.4
if 167.99809592077398 < y < 3.000595354627898e+87Initial program 37.3
rmApplied add-cube-cbrt24.8
Applied *-un-lft-identity24.8
Applied times-frac25.2
Final simplification5.0
herbie shell --seed 2020025
(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))