x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}\begin{array}{l}
\mathbf{if}\;z \le 1609.50674842192324831557925790548324585 \lor \neg \left(z \le 3.956447898588514434000900140654028393961 \cdot 10^{51}\right):\\
\;\;\;\;x + \frac{e^{y \cdot \left(1 \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)\right) + \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)\right)}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{e^{-1 \cdot z}}{y}\\
\end{array}double f(double x, double y, double z) {
double r376924 = x;
double r376925 = y;
double r376926 = z;
double r376927 = r376926 + r376925;
double r376928 = r376925 / r376927;
double r376929 = log(r376928);
double r376930 = r376925 * r376929;
double r376931 = exp(r376930);
double r376932 = r376931 / r376925;
double r376933 = r376924 + r376932;
return r376933;
}
double f(double x, double y, double z) {
double r376934 = z;
double r376935 = 1609.5067484219232;
bool r376936 = r376934 <= r376935;
double r376937 = 3.9564478985885144e+51;
bool r376938 = r376934 <= r376937;
double r376939 = !r376938;
bool r376940 = r376936 || r376939;
double r376941 = x;
double r376942 = y;
double r376943 = 1.0;
double r376944 = 2.0;
double r376945 = cbrt(r376942);
double r376946 = r376934 + r376942;
double r376947 = cbrt(r376946);
double r376948 = r376945 / r376947;
double r376949 = log(r376948);
double r376950 = r376944 * r376949;
double r376951 = r376943 * r376950;
double r376952 = r376951 + r376949;
double r376953 = r376942 * r376952;
double r376954 = exp(r376953);
double r376955 = r376954 / r376942;
double r376956 = r376941 + r376955;
double r376957 = -1.0;
double r376958 = r376957 * r376934;
double r376959 = exp(r376958);
double r376960 = r376959 / r376942;
double r376961 = r376941 + r376960;
double r376962 = r376940 ? r376956 : r376961;
return r376962;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.0 |
|---|---|
| Target | 1.1 |
| Herbie | 1.5 |
if z < 1609.5067484219232 or 3.9564478985885144e+51 < z Initial program 5.8
rmApplied add-cube-cbrt19.5
Applied add-cube-cbrt5.8
Applied times-frac5.8
Applied log-prod1.8
rmApplied pow11.8
Applied log-pow1.8
Simplified0.8
if 1609.5067484219232 < z < 3.9564478985885144e+51Initial program 9.2
Taylor expanded around inf 15.9
Final simplification1.5
herbie shell --seed 2019354
(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)))