x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}\begin{array}{l}
\mathbf{if}\;y \le -1.611458593987227695782152019682377982421 \cdot 10^{54}:\\
\;\;\;\;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 r457772 = x;
double r457773 = y;
double r457774 = z;
double r457775 = r457774 + r457773;
double r457776 = r457773 / r457775;
double r457777 = log(r457776);
double r457778 = r457773 * r457777;
double r457779 = exp(r457778);
double r457780 = r457779 / r457773;
double r457781 = r457772 + r457780;
return r457781;
}
double f(double x, double y, double z) {
double r457782 = y;
double r457783 = -1.6114585939872277e+54;
bool r457784 = r457782 <= r457783;
double r457785 = x;
double r457786 = -1.0;
double r457787 = z;
double r457788 = r457786 * r457787;
double r457789 = exp(r457788);
double r457790 = r457789 / r457782;
double r457791 = r457785 + r457790;
double r457792 = 2.0;
double r457793 = cbrt(r457782);
double r457794 = r457787 + r457782;
double r457795 = cbrt(r457794);
double r457796 = r457793 / r457795;
double r457797 = log(r457796);
double r457798 = r457792 * r457797;
double r457799 = 1.0;
double r457800 = r457798 * r457799;
double r457801 = r457800 * r457782;
double r457802 = r457782 * r457797;
double r457803 = r457801 + r457802;
double r457804 = exp(r457803);
double r457805 = r457804 / r457782;
double r457806 = r457785 + r457805;
double r457807 = r457784 ? r457791 : r457806;
return r457807;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.1 |
|---|---|
| Target | 1.2 |
| Herbie | 0.6 |
if y < -1.6114585939872277e+54Initial program 2.7
Taylor expanded around inf 0.0
if -1.6114585939872277e+54 < y Initial program 6.9
rmApplied add-cube-cbrt15.6
Applied add-cube-cbrt6.9
Applied times-frac6.9
Applied log-prod2.0
Applied distribute-lft-in2.0
Simplified0.8
Final simplification0.6
herbie shell --seed 2019362 +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)))