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



Bits error versus x



Bits error versus y



Bits error versus z
if y < -1.52092722637347932e151Initial program 4.4
Applied div-inv_binary644.4
Applied associate-*l*_binary640.1
if -1.52092722637347932e151 < y < 7.1786431178899603e-100Initial program 0.4
Applied *-un-lft-identity_binary640.4
Applied fma-neg_binary640.4
Simplified1.1
if 7.1786431178899603e-100 < y Initial program 1.9
Applied div-inv_binary641.9
Applied associate-*l*_binary640.6
Simplified0.6
Final simplification0.7
herbie shell --seed 2021332
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))