\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 \leq -7.617708137011477 \cdot 10^{+34} \lor \neg \left(\frac{x + 4}{y} - \frac{x}{y} \cdot z \leq 2.622117664153231 \cdot 10^{-63}\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}(FPCore (x y z) :precision binary64 (fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))
(FPCore (x y z)
:precision binary64
(if (or (<= (- (/ (+ x 4.0) y) (* (/ x y) z)) -7.617708137011477e+34)
(not (<= (- (/ (+ x 4.0) y) (* (/ x y) z)) 2.622117664153231e-63)))
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z)))
(fabs (/ (- (+ x 4.0) (* x z)) y))))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 tmp;
if (((((x + 4.0) / y) - ((x / y) * z)) <= -7.617708137011477e+34) || !((((x + 4.0) / y) - ((x / y) * z)) <= 2.622117664153231e-63)) {
tmp = fabs(((x + 4.0) / y) - ((x / y) * z));
} else {
tmp = fabs(((x + 4.0) - (x * z)) / y);
}
return tmp;
}



Bits error versus x



Bits error versus y



Bits error versus z
Results
if (-.f64 (/.f64 (+.f64 x 4) y) (*.f64 (/.f64 x y) z)) < -7.617708137011477e34 or 2.622117664153231e-63 < (-.f64 (/.f64 (+.f64 x 4) y) (*.f64 (/.f64 x y) z)) Initial program 0.1
if -7.617708137011477e34 < (-.f64 (/.f64 (+.f64 x 4) y) (*.f64 (/.f64 x y) z)) < 2.622117664153231e-63Initial program 3.5
Simplified0.2
Final simplification0.1
herbie shell --seed 2020295
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))