\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\begin{array}{l}
\mathbf{if}\;x \leq -1.1923139064597252 \cdot 10^{+53} \lor \neg \left(x \leq 1.7577378261899339 \cdot 10^{-99}\right):\\
\;\;\;\;\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}(FPCore (x y z) :precision binary64 (fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))
(FPCore (x y z) :precision binary64 (if (or (<= x -1.1923139064597252e+53) (not (<= x 1.7577378261899339e-99))) (fabs (- (/ (+ x 4.0) y) (* x (/ z y)))) (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.1923139064597252e+53) || !(x <= 1.7577378261899339e-99)) {
tmp = fabs(((x + 4.0) / y) - (x * (z / y)));
} 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.19231390645972515e53 or 1.7577378261899339e-99 < x Initial program 0.4
rmApplied div-inv_binary640.5
Applied associate-*l*_binary640.7
Simplified0.7
if -1.19231390645972515e53 < x < 1.7577378261899339e-99Initial program 2.4
Simplified0.2
Final simplification0.4
herbie shell --seed 2020232
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))