\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\begin{array}{l}
\mathbf{if}\;x \le -1.0123827290335041 \cdot 10^{70}:\\
\;\;\;\;\left|\mathsf{fma}\left(4, \frac{1}{y}, \frac{x}{y} \cdot \left(1 - z\right)\right)\right|\\
\mathbf{elif}\;x \le 2062453257231831:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|\\
\end{array}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 VAR;
if ((x <= -1.0123827290335041e+70)) {
VAR = fabs(fma(4.0, (1.0 / y), ((x / y) * (1.0 - z))));
} else {
double VAR_1;
if ((x <= 2062453257231831.0)) {
VAR_1 = fabs((((x + 4.0) - (x * z)) / y));
} else {
VAR_1 = fabs((((x + 4.0) / y) - (x * (z / y))));
}
VAR = VAR_1;
}
return VAR;
}



Bits error versus x



Bits error versus y



Bits error versus z
Results
if x < -1.0123827290335041e+70Initial program 0.1
Taylor expanded around 0 10.8
Simplified0.1
if -1.0123827290335041e+70 < x < 2062453257231831.0Initial program 2.3
rmApplied associate-*l/0.2
Applied sub-div0.2
if 2062453257231831.0 < x Initial program 0.1
rmApplied div-inv0.1
Applied associate-*l*0.1
Simplified0.1
Final simplification0.2
herbie shell --seed 2020105 +o rules:numerics
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4) y) (* (/ x y) z))))