x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}\begin{array}{l}
\mathbf{if}\;y \le 2.82172074555303536154305440376197327804 \cdot 10^{-37}:\\
\;\;\;\;x + \frac{e^{y \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right) + \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{e^{-z}}{y}\\
\end{array}double f(double x, double y, double z) {
double r339733 = x;
double r339734 = y;
double r339735 = z;
double r339736 = r339735 + r339734;
double r339737 = r339734 / r339736;
double r339738 = log(r339737);
double r339739 = r339734 * r339738;
double r339740 = exp(r339739);
double r339741 = r339740 / r339734;
double r339742 = r339733 + r339741;
return r339742;
}
double f(double x, double y, double z) {
double r339743 = y;
double r339744 = 2.8217207455530354e-37;
bool r339745 = r339743 <= r339744;
double r339746 = x;
double r339747 = 2.0;
double r339748 = cbrt(r339743);
double r339749 = z;
double r339750 = r339749 + r339743;
double r339751 = cbrt(r339750);
double r339752 = r339748 / r339751;
double r339753 = log(r339752);
double r339754 = r339747 * r339753;
double r339755 = r339754 + r339753;
double r339756 = r339743 * r339755;
double r339757 = exp(r339756);
double r339758 = r339757 / r339743;
double r339759 = r339746 + r339758;
double r339760 = -r339749;
double r339761 = exp(r339760);
double r339762 = r339761 / r339743;
double r339763 = r339746 + r339762;
double r339764 = r339745 ? r339759 : r339763;
return r339764;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.2 |
|---|---|
| Target | 1.1 |
| Herbie | 1.1 |
if y < 2.8217207455530354e-37Initial program 8.4
rmApplied add-cube-cbrt20.0
Applied add-cube-cbrt8.4
Applied times-frac8.4
Applied log-prod2.4
Simplified0.9
if 2.8217207455530354e-37 < y Initial program 1.7
Taylor expanded around inf 1.4
Simplified1.4
Final simplification1.1
herbie shell --seed 2019235
(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.1154157598e-315) (+ x (/ (exp (/ -1 z)) y)) (+ x (/ (exp (log (pow (/ y (+ y z)) y))) y)))
(+ x (/ (exp (* y (log (/ y (+ z y))))) y)))