\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|
\begin{array}{l}
\mathbf{if}\;x \leq -4.980485186604296 \cdot 10^{-32}:\\
\;\;\;\;\left|\frac{x + 4}{y} - z \cdot \frac{x}{y}\right|\\
\mathbf{elif}\;x \leq 27202980690870932:\\
\;\;\;\;\left|\frac{x - \mathsf{fma}\left(x, z, -4\right)}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{\sqrt[3]{64}}{y} + \frac{x}{y} \cdot \left(\sqrt[3]{64} \cdot 0.25 - z\right)\right|\\
\end{array}
(FPCore (x y z) :precision binary64 (fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))
(FPCore (x y z)
:precision binary64
(if (<= x -4.980485186604296e-32)
(fabs (- (/ (+ x 4.0) y) (* z (/ x y))))
(if (<= x 27202980690870932.0)
(fabs (/ (- x (fma x z -4.0)) y))
(fabs (+ (/ (cbrt 64.0) y) (* (/ x y) (- (* (cbrt 64.0) 0.25) z)))))))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.980485186604296e-32) {
tmp = fabs(((x + 4.0) / y) - (z * (x / y)));
} else if (x <= 27202980690870932.0) {
tmp = fabs((x - fma(x, z, -4.0)) / y);
} else {
tmp = fabs((cbrt(64.0) / y) + ((x / y) * ((cbrt(64.0) * 0.25) - z)));
}
return tmp;
}



Bits error versus x



Bits error versus y



Bits error versus z
if x < -4.9804851866042962e-32Initial program 0.2
Applied add-cube-cbrt_binary640.6
Taylor expanded in x around 0 8.0
Simplified0.2
if -4.9804851866042962e-32 < x < 27202980690870932Initial program 2.7
Simplified0.1
if 27202980690870932 < x Initial program 0.1
Applied add-cube-cbrt_binary640.9
Applied fma-neg_binary640.9
Taylor expanded in x around 0 10.4
Simplified0.1
Final simplification0.1
herbie shell --seed 2021329
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))