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



Bits error versus x



Bits error versus y



Bits error versus z
if x < -0.013284199379893075 or 0.075979552927626523 < x Initial program 0.1
if -0.013284199379893075 < x < 0.075979552927626523Initial program 2.8
Simplified0.1
Final simplification0.1
herbie shell --seed 2022151
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))