(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) (* (/ x y) z))) (t_1 (fabs t_0)))
(if (<= t_0 -4.342490900678005e-20)
t_1
(if (<= t_0 1.6211268901314473e-72)
(fabs (- (/ x y) (/ (fma x z -4.0) y)))
t_1))))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) - ((x / y) * z);
double t_1 = fabs(t_0);
double tmp;
if (t_0 <= -4.342490900678005e-20) {
tmp = t_1;
} else if (t_0 <= 1.6211268901314473e-72) {
tmp = fabs(((x / y) - (fma(x, z, -4.0) / y)));
} else {
tmp = t_1;
}
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 = Float64(Float64(Float64(x + 4.0) / y) - Float64(Float64(x / y) * z)) t_1 = abs(t_0) tmp = 0.0 if (t_0 <= -4.342490900678005e-20) tmp = t_1; elseif (t_0 <= 1.6211268901314473e-72) tmp = abs(Float64(Float64(x / y) - Float64(fma(x, z, -4.0) / y))); else tmp = t_1; 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[(N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision] - N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Abs[t$95$0], $MachinePrecision]}, If[LessEqual[t$95$0, -4.342490900678005e-20], t$95$1, If[LessEqual[t$95$0, 1.6211268901314473e-72], N[Abs[N[(N[(x / y), $MachinePrecision] - N[(N[(x * z + -4.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]
\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|
\begin{array}{l}
t_0 := \frac{x + 4}{y} - \frac{x}{y} \cdot z\\
t_1 := \left|t_0\right|\\
\mathbf{if}\;t_0 \leq -4.342490900678005 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_0 \leq 1.6211268901314473 \cdot 10^{-72}:\\
\;\;\;\;\left|\frac{x}{y} - \frac{\mathsf{fma}\left(x, z, -4\right)}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}



Bits error versus x



Bits error versus y



Bits error versus z
if (-.f64 (/.f64 (+.f64 x 4) y) (*.f64 (/.f64 x y) z)) < -4.34249090067800473e-20 or 1.62112689013145e-72 < (-.f64 (/.f64 (+.f64 x 4) y) (*.f64 (/.f64 x y) z)) Initial program 0.2
if -4.34249090067800473e-20 < (-.f64 (/.f64 (+.f64 x 4) y) (*.f64 (/.f64 x y) z)) < 1.62112689013145e-72Initial program 4.1
Simplified0.1
Applied div-sub_binary640.1
Final simplification0.1
herbie shell --seed 2022129
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))