\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|
\begin{array}{l}
\mathbf{if}\;y \leq -9.558233736210092 \cdot 10^{-113}:\\
\;\;\;\;\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{\mathsf{fma}\left(x, 1 - z, 4\right)}{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 (<= y -9.558233736210092e-113) (fabs (- (/ (+ x 4.0) y) (* (/ x y) z))) (fabs (/ (fma x (- 1.0 z) 4.0) 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 (y <= -9.558233736210092e-113) {
tmp = fabs(((x + 4.0) / y) - ((x / y) * z));
} else {
tmp = fabs(fma(x, (1.0 - z), 4.0) / y);
}
return tmp;
}



Bits error versus x



Bits error versus y



Bits error versus z
if y < -9.5582337362100922e-113Initial program 2.8
if -9.5582337362100922e-113 < y Initial program 6.6
Simplified1.9
Applied add-cube-cbrt_binary642.6
Applied add-cube-cbrt_binary642.8
Applied prod-diff_binary648.9
Simplified8.1
Simplified1.9
Final simplification2.2
herbie shell --seed 2022068
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))