\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 51088118733.370209:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) \cdot x}}{x}\\
\mathbf{elif}\;y \le 5.09320930132939825 \cdot 10^{119}:\\
\;\;\;\;\frac{e^{x \cdot \log \left(\frac{x}{x \cdot x - y \cdot y} \cdot \left(x - y\right)\right)}}{x}\\
\mathbf{elif}\;y \le 1.17402130880148184 \cdot 10^{142}:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\mathsf{log1p}\left(\mathsf{expm1}\left(\sqrt[3]{x}\right)\right)}{\sqrt[3]{x + y}}\right)\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) \cdot x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt[3]{x}\right)\right)}{\sqrt[3]{x + y}}\right)\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right) \cdot x}}{x}\\
\end{array}double f(double x, double y) {
double r377274 = x;
double r377275 = y;
double r377276 = r377274 + r377275;
double r377277 = r377274 / r377276;
double r377278 = log(r377277);
double r377279 = r377274 * r377278;
double r377280 = exp(r377279);
double r377281 = r377280 / r377274;
return r377281;
}
double f(double x, double y) {
double r377282 = y;
double r377283 = 51088118733.37021;
bool r377284 = r377282 <= r377283;
double r377285 = x;
double r377286 = 2.0;
double r377287 = cbrt(r377285);
double r377288 = r377285 + r377282;
double r377289 = cbrt(r377288);
double r377290 = r377287 / r377289;
double r377291 = log(r377290);
double r377292 = r377286 * r377291;
double r377293 = r377285 * r377292;
double r377294 = r377291 * r377285;
double r377295 = r377293 + r377294;
double r377296 = exp(r377295);
double r377297 = r377296 / r377285;
double r377298 = 5.093209301329398e+119;
bool r377299 = r377282 <= r377298;
double r377300 = r377285 * r377285;
double r377301 = r377282 * r377282;
double r377302 = r377300 - r377301;
double r377303 = r377285 / r377302;
double r377304 = r377285 - r377282;
double r377305 = r377303 * r377304;
double r377306 = log(r377305);
double r377307 = r377285 * r377306;
double r377308 = exp(r377307);
double r377309 = r377308 / r377285;
double r377310 = 1.1740213088014818e+142;
bool r377311 = r377282 <= r377310;
double r377312 = expm1(r377287);
double r377313 = log1p(r377312);
double r377314 = r377313 / r377289;
double r377315 = log(r377314);
double r377316 = r377286 * r377315;
double r377317 = r377285 * r377316;
double r377318 = r377317 + r377294;
double r377319 = exp(r377318);
double r377320 = r377319 / r377285;
double r377321 = log1p(r377287);
double r377322 = expm1(r377321);
double r377323 = r377322 / r377289;
double r377324 = log(r377323);
double r377325 = r377286 * r377324;
double r377326 = r377285 * r377325;
double r377327 = r377326 + r377294;
double r377328 = exp(r377327);
double r377329 = r377328 / r377285;
double r377330 = r377311 ? r377320 : r377329;
double r377331 = r377299 ? r377309 : r377330;
double r377332 = r377284 ? r377297 : r377331;
return r377332;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 8.2 |
| Herbie | 5.2 |
if y < 51088118733.37021Initial program 4.7
rmApplied add-cube-cbrt28.8
Applied add-cube-cbrt4.7
Applied times-frac4.7
Applied log-prod2.0
Applied distribute-lft-in2.0
Simplified1.4
Simplified1.4
if 51088118733.37021 < y < 5.093209301329398e+119Initial program 34.9
rmApplied flip-+24.2
Applied associate-/r/27.6
if 5.093209301329398e+119 < y < 1.1740213088014818e+142Initial program 33.7
rmApplied add-cube-cbrt24.3
Applied add-cube-cbrt33.7
Applied times-frac33.7
Applied log-prod28.3
Applied distribute-lft-in28.3
Simplified28.3
Simplified28.3
rmApplied log1p-expm1-u25.0
if 1.1740213088014818e+142 < y Initial program 28.6
rmApplied add-cube-cbrt25.2
Applied add-cube-cbrt28.9
Applied times-frac28.9
Applied log-prod15.4
Applied distribute-lft-in15.4
Simplified10.0
Simplified10.0
rmApplied expm1-log1p-u9.4
Final simplification5.2
herbie shell --seed 2020047 +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))