\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\begin{array}{l}
\mathbf{if}\;x \leq -344174721191547.56 \lor \neg \left(x \leq 2.2927280930762683 \cdot 10^{-10}\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 -344174721191547.56) (not (<= x 2.2927280930762683e-10))) (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 <= -344174721191547.56) || !(x <= 2.2927280930762683e-10)) {
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 < -344174721191547.562 or 2.29272809307626828e-10 < x Initial program 0.1
rmApplied div-inv_binary64_750.2
Applied associate-*l*_binary64_190.2
Simplified0.1
if -344174721191547.562 < x < 2.29272809307626828e-10Initial program 2.9
Simplified0.1
Final simplification0.1
herbie shell --seed 2021084
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))