\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\begin{array}{l}
\mathbf{if}\;x \leq -54822146.32625891 \lor \neg \left(x \leq 1.9654463681291534 \cdot 10^{-103}\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 -54822146.32625891) (not (<= x 1.9654463681291534e-103))) (fabs (- (/ (+ x 4.0) y) (* x (/ z y)))) (fabs (/ (- (+ x 4.0) (* x z)) y))))
double code(double x, double y, double z) {
return ((double) fabs(((double) ((((double) (x + 4.0)) / y) - ((double) ((x / y) * z))))));
}
double code(double x, double y, double z) {
double tmp;
if (((x <= -54822146.32625891) || !(x <= 1.9654463681291534e-103))) {
tmp = ((double) fabs(((double) ((((double) (x + 4.0)) / y) - ((double) (x * (z / y)))))));
} else {
tmp = ((double) fabs((((double) (((double) (x + 4.0)) - ((double) (x * z)))) / y)));
}
return tmp;
}



Bits error versus x



Bits error versus y



Bits error versus z
Results
if x < -54822146.326258913 or 1.96544636812915342e-103 < x Initial program 0.5
rmApplied div-inv_binary640.5
Applied associate-*l*_binary640.7
Simplified0.7
if -54822146.326258913 < x < 1.96544636812915342e-103Initial program 2.5
Simplified0.1
Final simplification0.4
herbie shell --seed 2020210
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))