\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\begin{array}{l}
\mathbf{if}\;x \leq -1.7429854943650131 \cdot 10^{+115} \lor \neg \left(x \leq 37353373238.45994\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 -1.7429854943650131e+115) (not (<= x 37353373238.45994))) (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 <= -1.7429854943650131e+115) || !(x <= 37353373238.45994)) {
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 x < -1.74298549436501312e115 or 37353373238.459938 < x Initial program 0.1
if -1.74298549436501312e115 < x < 37353373238.459938Initial program 2.3
Simplified0.5
Final simplification0.4
herbie shell --seed 2020224
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))