\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\begin{array}{l}
\mathbf{if}\;x \leq -1.3477499219079297 \cdot 10^{-62} \lor \neg \left(x \leq 1.0497899555755409 \cdot 10^{-131}\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.3477499219079297e-62) (not (<= x 1.0497899555755409e-131))) (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.3477499219079297e-62) || !(x <= 1.0497899555755409e-131)) {
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.34774992190792966e-62 or 1.04978995557554092e-131 < x Initial program 0.7
rmApplied div-inv_binary640.7
Applied associate-*l*_binary640.8
Simplified0.8
if -1.34774992190792966e-62 < x < 1.04978995557554092e-131Initial program 2.6
Simplified0.1
Final simplification0.5
herbie shell --seed 2021113
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))