\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 -1.7752144640494725 \cdot 10^{+134} \lor \neg \left(\frac{x + 4}{y} - \frac{x}{y} \cdot z \leq 5.586231394031493 \cdot 10^{+200}\right):\\
\;\;\;\;\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x + 4}{y} - x \cdot \frac{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)) -1.7752144640494725e+134)
(not (<= (- (/ (+ x 4.0) y) (* (/ x y) z)) 5.586231394031493e+200)))
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z)))
(fabs (- (/ (+ x 4.0) y) (* 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)) <= -1.7752144640494725e+134) || !((((x + 4.0) / y) - ((x / y) * z)) <= 5.586231394031493e+200)) {
tmp = fabs(((x + 4.0) / y) - ((x / y) * z));
} else {
tmp = fabs(((x + 4.0) / y) - (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)) < -1.7752144640494725e134 or 5.58623139403149307e200 < (-.f64 (/.f64 (+.f64 x 4) y) (*.f64 (/.f64 x y) z)) Initial program 0.1
if -1.7752144640494725e134 < (-.f64 (/.f64 (+.f64 x 4) y) (*.f64 (/.f64 x y) z)) < 5.58623139403149307e200Initial program 2.1
rmApplied div-inv_binary64_752.1
Applied associate-*l*_binary64_191.1
Simplified1.0
Final simplification0.8
herbie shell --seed 2020356
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))