\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\begin{array}{l}
\mathbf{if}\;\frac{x + 4}{y} - \frac{x}{y} \cdot z \le -2.15195677319828921 \cdot 10^{-53} \lor \neg \left(\frac{x + 4}{y} - \frac{x}{y} \cdot z \le 6.1198321354959944 \cdot 10^{138}\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 + 4.0) / y) - ((x / y) * z)) <= -2.151956773198289e-53) || !((((x + 4.0) / y) - ((x / y) * z)) <= 6.119832135495994e+138))) {
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 4.0) y) (* (/ x y) z)) < -2.151956773198289e-53 or 6.119832135495994e+138 < (- (/ (+ x 4.0) y) (* (/ x y) z)) Initial program 0.1
if -2.151956773198289e-53 < (- (/ (+ x 4.0) y) (* (/ x y) z)) < 6.119832135495994e+138Initial program 3.1
rmApplied associate-*l/1.0
Applied sub-div1.0
Final simplification0.6
herbie shell --seed 2020058
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4) y) (* (/ x y) z))))