\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\begin{array}{l}
\mathbf{if}\;x \leq -2.3799731064557978 \cdot 10^{-40} \lor \neg \left(x \leq 8.445136388882722 \cdot 10^{-77}\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 -2.3799731064557978e-40) (not (<= x 8.445136388882722e-77))) (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 <= -2.3799731064557978e-40) || !(x <= 8.445136388882722e-77)) {
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 < -2.3799731064557978e-40 or 8.4451363888827224e-77 < x Initial program 0.5
rmApplied div-inv_binary64_750.5
Applied associate-*l*_binary64_190.5
Simplified0.5
if -2.3799731064557978e-40 < x < 8.4451363888827224e-77Initial program 2.7
Simplified0.1
Final simplification0.3
herbie shell --seed 2020342
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))