\frac{x \cdot \left(y + z\right)}{z}\begin{array}{l}
\mathbf{if}\;y \le -2.7399166020451276 \cdot 10^{174}:\\
\;\;\;\;\frac{x \cdot y}{z} + x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y + z}}\\
\end{array}double code(double x, double y, double z) {
return ((double) (((double) (x * ((double) (y + z)))) / z));
}
double code(double x, double y, double z) {
double VAR;
if ((y <= -2.7399166020451276e+174)) {
VAR = ((double) (((double) (((double) (x * y)) / z)) + x));
} else {
VAR = ((double) (x / ((double) (z / ((double) (y + z))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.7 |
|---|---|
| Target | 3.2 |
| Herbie | 3.2 |
if y < -2.7399166020451276e174Initial program 13.8
Taylor expanded around 0 13.1
if -2.7399166020451276e174 < y Initial program 12.7
rmApplied associate-/l*2.4
Final simplification3.2
herbie shell --seed 2020147
(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))