\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\begin{array}{l}
\mathbf{if}\;x \le -1.09954904008270574 \cdot 10^{-121}:\\
\;\;\;\;\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|\\
\mathbf{elif}\;x \le 4360323.74267882574:\\
\;\;\;\;\left|\frac{x + 4}{y} - \frac{x \cdot z}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\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 <= -1.0995490400827057e-121)) {
temp = fabs((((x + 4.0) / y) - (x * (z / y))));
} else {
double temp_1;
if ((x <= 4360323.742678826)) {
temp_1 = fabs((((x + 4.0) / y) - ((x * z) / y)));
} else {
temp_1 = fabs((((x + 4.0) / y) - ((x / y) * z)));
}
temp = temp_1;
}
return temp;
}



Bits error versus x



Bits error versus y



Bits error versus z
Results
if x < -1.0995490400827057e-121Initial program 0.9
rmApplied div-inv0.9
Applied associate-*l*1.0
Simplified0.9
if -1.0995490400827057e-121 < x < 4360323.742678826Initial program 2.8
rmApplied associate-*l/0.1
if 4360323.742678826 < x Initial program 0.1
Final simplification0.3
herbie shell --seed 2020056 +o rules:numerics
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4) y) (* (/ x y) z))))