(FPCore (x y z) :precision binary64 (fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))
(FPCore (x y z)
:precision binary64
(let* ((t_0 (fabs (- (/ (+ x 4.0) y) (* x (/ z y))))))
(if (<= x -6.637804509326453e-23)
t_0
(if (<= x 2.957230781506295e-53)
(fabs (/ (fma x (- 1.0 z) 4.0) y))
t_0))))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 = fabs((((x + 4.0) / y) - (x * (z / y))));
double tmp;
if (x <= -6.637804509326453e-23) {
tmp = t_0;
} else if (x <= 2.957230781506295e-53) {
tmp = fabs((fma(x, (1.0 - z), 4.0) / y));
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) return abs(Float64(Float64(Float64(x + 4.0) / y) - Float64(Float64(x / y) * z))) end
function code(x, y, z) t_0 = abs(Float64(Float64(Float64(x + 4.0) / y) - Float64(x * Float64(z / y)))) tmp = 0.0 if (x <= -6.637804509326453e-23) tmp = t_0; elseif (x <= 2.957230781506295e-53) tmp = abs(Float64(fma(x, Float64(1.0 - z), 4.0) / y)); else tmp = t_0; end return tmp end
code[x_, y_, z_] := N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision] - N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
code[x_, y_, z_] := Block[{t$95$0 = N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision] - N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, -6.637804509326453e-23], t$95$0, If[LessEqual[x, 2.957230781506295e-53], N[Abs[N[(N[(x * N[(1.0 - z), $MachinePrecision] + 4.0), $MachinePrecision] / y), $MachinePrecision]], $MachinePrecision], t$95$0]]]
\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|
\begin{array}{l}
t_0 := \left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|\\
\mathbf{if}\;x \leq -6.637804509326453 \cdot 10^{-23}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.957230781506295 \cdot 10^{-53}:\\
\;\;\;\;\left|\frac{\mathsf{fma}\left(x, 1 - z, 4\right)}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}



Bits error versus x



Bits error versus y



Bits error versus z
if x < -6.6378045093264531e-23 or 2.9572307815062952e-53 < x Initial program 0.2
Applied egg-rr0.3
Applied egg-rr0.3
if -6.6378045093264531e-23 < x < 2.9572307815062952e-53Initial program 2.7
Taylor expanded in x around 0 0.1
Simplified0.1
Final simplification0.2
herbie shell --seed 2022131
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))