\frac{x \cdot \left(y + z\right)}{z}\begin{array}{l}
\mathbf{if}\;y \le -1.7672276150092905 \cdot 10^{236}:\\
\;\;\;\;\frac{1 \cdot \left(x \cdot \left(y + z\right)\right)}{z}\\
\mathbf{elif}\;y \le 1.76861279965385967 \cdot 10^{95}:\\
\;\;\;\;\frac{x}{\frac{z}{y + z}}\\
\mathbf{elif}\;y \le 4.8253144849401574 \cdot 10^{212}:\\
\;\;\;\;\frac{x}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{y + z}{\sqrt[3]{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{z}{x \cdot \left(y + z\right)}}\\
\end{array}double code(double x, double y, double z) {
return ((x * (y + z)) / z);
}
double code(double x, double y, double z) {
double temp;
if ((y <= -1.7672276150092905e+236)) {
temp = ((1.0 * (x * (y + z))) / z);
} else {
double temp_1;
if ((y <= 1.7686127996538597e+95)) {
temp_1 = (x / (z / (y + z)));
} else {
double temp_2;
if ((y <= 4.825314484940157e+212)) {
temp_2 = ((x / (cbrt(z) * cbrt(z))) * ((y + z) / cbrt(z)));
} else {
temp_2 = (1.0 / (z / (x * (y + z))));
}
temp_1 = temp_2;
}
temp = temp_1;
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.1 |
|---|---|
| Target | 3.2 |
| Herbie | 3.1 |
if y < -1.7672276150092905e+236Initial program 13.5
rmApplied *-un-lft-identity13.5
if -1.7672276150092905e+236 < y < 1.7686127996538597e+95Initial program 12.1
rmApplied associate-/l*1.4
if 1.7686127996538597e+95 < y < 4.825314484940157e+212Initial program 10.0
rmApplied add-cube-cbrt11.0
Applied times-frac7.7
if 4.825314484940157e+212 < y Initial program 13.3
rmApplied clear-num13.3
Final simplification3.1
herbie shell --seed 2020058 +o rules:numerics
(FPCore (x y z)
:name "Numeric.SpecFunctions:choose from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(/ x (/ z (+ y z)))
(/ (* x (+ y z)) z))