x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}\begin{array}{l}
\mathbf{if}\;y \le -2.60386222655851775 \cdot 10^{151}:\\
\;\;\;\;x + \frac{e^{-1 \cdot z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{e^{\left(\left(2 \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)\right) \cdot 1\right) \cdot y + y \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)}}{y}\\
\end{array}double f(double x, double y, double z) {
double r560608 = x;
double r560609 = y;
double r560610 = z;
double r560611 = r560610 + r560609;
double r560612 = r560609 / r560611;
double r560613 = log(r560612);
double r560614 = r560609 * r560613;
double r560615 = exp(r560614);
double r560616 = r560615 / r560609;
double r560617 = r560608 + r560616;
return r560617;
}
double f(double x, double y, double z) {
double r560618 = y;
double r560619 = -2.6038622265585177e+151;
bool r560620 = r560618 <= r560619;
double r560621 = x;
double r560622 = -1.0;
double r560623 = z;
double r560624 = r560622 * r560623;
double r560625 = exp(r560624);
double r560626 = r560625 / r560618;
double r560627 = r560621 + r560626;
double r560628 = 2.0;
double r560629 = cbrt(r560618);
double r560630 = r560623 + r560618;
double r560631 = cbrt(r560630);
double r560632 = r560629 / r560631;
double r560633 = log(r560632);
double r560634 = r560628 * r560633;
double r560635 = 1.0;
double r560636 = r560634 * r560635;
double r560637 = r560636 * r560618;
double r560638 = r560618 * r560633;
double r560639 = r560637 + r560638;
double r560640 = exp(r560639);
double r560641 = r560640 / r560618;
double r560642 = r560621 + r560641;
double r560643 = r560620 ? r560627 : r560642;
return r560643;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 5.8 |
|---|---|
| Target | 1.0 |
| Herbie | 0.7 |
if y < -2.6038622265585177e+151Initial program 2.1
Taylor expanded around inf 0.0
if -2.6038622265585177e+151 < y Initial program 6.4
rmApplied add-cube-cbrt17.1
Applied add-cube-cbrt6.4
Applied times-frac6.4
Applied log-prod2.0
Applied distribute-lft-in2.0
Simplified0.8
Final simplification0.7
herbie shell --seed 2020057
(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)))