\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\begin{array}{l}
\mathbf{if}\;x \leq -1.0327798710615128 \cdot 10^{+36} \lor \neg \left(x \leq 3.292944409666188 \cdot 10^{-105}\right):\\
\;\;\;\;\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x + 4}{y} - \frac{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.0327798710615128e+36) (not (<= x 3.292944409666188e-105))) (fabs (- (/ (+ x 4.0) y) (* x (/ z y)))) (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 <= -1.0327798710615128e+36) || !(x <= 3.292944409666188e-105)) {
tmp = fabs(((x + 4.0) / y) - (x * (z / y)));
} 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 x < -1.0327798710615128e36 or 3.29294440966618795e-105 < x Initial program 0.6
rmApplied div-inv_binary64_750.6
Applied associate-*l*_binary64_190.6
Simplified0.6
if -1.0327798710615128e36 < x < 3.29294440966618795e-105Initial program 2.8
Taylor expanded around 0 0.1
Final simplification0.3
herbie shell --seed 2021045
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))