\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\begin{array}{l}
\mathbf{if}\;y \leq -8.278448837687982 \cdot 10^{+145}:\\
\;\;\;\;\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|\\
\mathbf{elif}\;y \leq -2.2732327689230565 \cdot 10^{-282}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y}\right|\\
\mathbf{elif}\;y \leq 1.532546704293406 \cdot 10^{+136}:\\
\;\;\;\;\left|\frac{4}{y} + \frac{x}{y} \cdot \left(1 - z\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x + 4}{y} - 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
(if (<= y -8.278448837687982e+145)
(fabs (- (/ (+ x 4.0) y) (* x (/ z y))))
(if (<= y -2.2732327689230565e-282)
(fabs (/ (- (+ x 4.0) (* x z)) y))
(if (<= y 1.532546704293406e+136)
(fabs (+ (/ 4.0 y) (* (/ x y) (- 1.0 z))))
(fabs (- (/ (+ x 4.0) y) (* 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 tmp;
if (y <= -8.278448837687982e+145) {
tmp = fabs(((x + 4.0) / y) - (x * (z / y)));
} else if (y <= -2.2732327689230565e-282) {
tmp = fabs(((x + 4.0) - (x * z)) / y);
} else if (y <= 1.532546704293406e+136) {
tmp = fabs((4.0 / y) + ((x / y) * (1.0 - z)));
} else {
tmp = fabs(((x + 4.0) / y) - (x * (z / y)));
}
return tmp;
}



Bits error versus x



Bits error versus y



Bits error versus z
Results
if y < -8.2784488376879818e145 or 1.53254670429340598e136 < y Initial program 4.6
rmApplied div-inv_binary64_754.6
Applied associate-*l*_binary64_190.1
Simplified0.1
if -8.2784488376879818e145 < y < -2.2732327689230565e-282Initial program 0.3
Simplified1.5
if -2.2732327689230565e-282 < y < 1.53254670429340598e136Initial program 0.3
Taylor expanded around 0 1.6
Simplified0.3
Final simplification0.6
herbie shell --seed 2020308
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))