\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\begin{array}{l}
\mathbf{if}\;x \le -1097352739.18932986 \lor \neg \left(x \le 1.1704247077394178 \cdot 10^{-39}\right):\\
\;\;\;\;\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y}\right|\\
\end{array}double code(double x, double y, double z) {
return fabs((((x + 4.0) / y) - ((x / y) * z)));
}
double code(double x, double y, double z) {
double temp;
if (((x <= -1097352739.1893299) || !(x <= 1.1704247077394178e-39))) {
temp = fabs((((x + 4.0) / y) - ((x / y) * z)));
} else {
temp = fabs((((x + 4.0) - (x * z)) / y));
}
return temp;
}



Bits error versus x



Bits error versus y



Bits error versus z
Results
if x < -1097352739.1893299 or 1.1704247077394178e-39 < x Initial program 0.2
if -1097352739.1893299 < x < 1.1704247077394178e-39Initial program 2.8
rmApplied associate-*l/0.1
Applied sub-div0.1
Final simplification0.1
herbie shell --seed 2020060
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4) y) (* (/ x y) z))))