x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}\begin{array}{l}
\mathbf{if}\;\frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y} \le -10910987967306.1348 \lor \neg \left(\frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y} \le -7.71869811703901377 \cdot 10^{-252}\right):\\
\;\;\;\;x + \frac{e^{y \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)\right) + y \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + e^{-1 \cdot z} \cdot \frac{1}{y}\\
\end{array}double f(double x, double y, double z) {
double r437575 = x;
double r437576 = y;
double r437577 = z;
double r437578 = r437577 + r437576;
double r437579 = r437576 / r437578;
double r437580 = log(r437579);
double r437581 = r437576 * r437580;
double r437582 = exp(r437581);
double r437583 = r437582 / r437576;
double r437584 = r437575 + r437583;
return r437584;
}
double f(double x, double y, double z) {
double r437585 = y;
double r437586 = z;
double r437587 = r437586 + r437585;
double r437588 = r437585 / r437587;
double r437589 = log(r437588);
double r437590 = r437585 * r437589;
double r437591 = exp(r437590);
double r437592 = r437591 / r437585;
double r437593 = -10910987967306.135;
bool r437594 = r437592 <= r437593;
double r437595 = -7.718698117039014e-252;
bool r437596 = r437592 <= r437595;
double r437597 = !r437596;
bool r437598 = r437594 || r437597;
double r437599 = x;
double r437600 = 2.0;
double r437601 = cbrt(r437585);
double r437602 = cbrt(r437587);
double r437603 = r437601 / r437602;
double r437604 = log(r437603);
double r437605 = r437600 * r437604;
double r437606 = r437585 * r437605;
double r437607 = r437585 * r437604;
double r437608 = r437606 + r437607;
double r437609 = exp(r437608);
double r437610 = r437609 / r437585;
double r437611 = r437599 + r437610;
double r437612 = -1.0;
double r437613 = r437612 * r437586;
double r437614 = exp(r437613);
double r437615 = 1.0;
double r437616 = r437615 / r437585;
double r437617 = r437614 * r437616;
double r437618 = r437599 + r437617;
double r437619 = r437598 ? r437611 : r437618;
return r437619;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.3 |
|---|---|
| Target | 1.3 |
| Herbie | 0.9 |
if (/ (exp (* y (log (/ y (+ z y))))) y) < -10910987967306.135 or -7.718698117039014e-252 < (/ (exp (* y (log (/ y (+ z y))))) y) Initial program 7.1
rmApplied add-cube-cbrt15.8
Applied add-cube-cbrt7.1
Applied times-frac7.1
Applied log-prod2.2
Applied distribute-lft-in2.2
Simplified0.8
if -10910987967306.135 < (/ (exp (* y (log (/ y (+ z y))))) y) < -7.718698117039014e-252Initial program 3.0
Taylor expanded around inf 1.1
rmApplied div-inv1.1
Final simplification0.9
herbie shell --seed 2020060 +o rules:numerics
(FPCore (x y z)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, G"
:precision binary64
:herbie-target
(if (< (/ y (+ z y)) 7.1154157597908e-315) (+ x (/ (exp (/ -1 z)) y)) (+ x (/ (exp (log (pow (/ y (+ y z)) y))) y)))
(+ x (/ (exp (* y (log (/ y (+ z y))))) y)))