\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|
\begin{array}{l}
t_0 := \frac{x + 4}{y}\\
t_1 := t_0 - \frac{x}{y} \cdot z\\
\mathbf{if}\;t_1 \leq -1.251895654907906 \cdot 10^{+181}:\\
\;\;\;\;\left|t_0 - \frac{1}{\frac{\frac{y}{x}}{z}}\right|\\
\mathbf{elif}\;t_1 \leq 117100.00123213959:\\
\;\;\;\;\left|t_0 - \frac{x}{\frac{y}{z}}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|t_0 - \frac{z}{\frac{y}{x}}\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)) (t_1 (- t_0 (* (/ x y) z))))
(if (<= t_1 -1.251895654907906e+181)
(fabs (- t_0 (/ 1.0 (/ (/ y x) z))))
(if (<= t_1 117100.00123213959)
(fabs (- t_0 (/ x (/ y z))))
(fabs (- t_0 (/ z (/ y x))))))))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 t_1 = t_0 - ((x / y) * z);
double tmp;
if (t_1 <= -1.251895654907906e+181) {
tmp = fabs(t_0 - (1.0 / ((y / x) / z)));
} else if (t_1 <= 117100.00123213959) {
tmp = fabs(t_0 - (x / (y / z)));
} else {
tmp = fabs(t_0 - (z / (y / x)));
}
return tmp;
}



Bits error versus x



Bits error versus y



Bits error versus z
Results
if (-.f64 (/.f64 (+.f64 x 4) y) (*.f64 (/.f64 x y) z)) < -1.251895654907906e181Initial program 0.1
Applied egg0.1
Applied egg0.1
if -1.251895654907906e181 < (-.f64 (/.f64 (+.f64 x 4) y) (*.f64 (/.f64 x y) z)) < 117100.00123213959Initial program 2.6
Applied egg0.6
if 117100.00123213959 < (-.f64 (/.f64 (+.f64 x 4) y) (*.f64 (/.f64 x y) z)) Initial program 0.1
Applied egg0.1
Final simplification0.4
herbie shell --seed 2022125
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))