\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\begin{array}{l}
\mathbf{if}\;x \le -1.3048045882813734 \cdot 10^{43}:\\
\;\;\;\;\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\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 VAR;
if ((x <= -1.3048045882813734e+43)) {
VAR = fabs((((x + 4.0) / y) - (x * (z / y))));
} else {
VAR = fabs((((x + 4.0) - (x * z)) / y));
}
return VAR;
}



Bits error versus x



Bits error versus y



Bits error versus z
Results
if x < -1.3048045882813734e+43Initial program 0.1
rmApplied div-inv0.1
Applied associate-*l*0.2
Simplified0.1
if -1.3048045882813734e+43 < x Initial program 2.0
rmApplied associate-*l/1.9
Applied sub-div1.9
Final simplification1.7
herbie shell --seed 2020079
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4) y) (* (/ x y) z))))