(FPCore (x y z) :precision binary64 (fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))
(FPCore (x y z) :precision binary64 (fabs (fma (/ (- x) y) z (/ (+ x 4.0) 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) {
return fabs(fma((-x / y), z, ((x + 4.0) / y)));
}
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) return abs(fma(Float64(Float64(-x) / y), z, Float64(Float64(x + 4.0) / y))) 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_] := N[Abs[N[(N[((-x) / y), $MachinePrecision] * z + N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|
\left|\mathsf{fma}\left(\frac{-x}{y}, z, \frac{x + 4}{y}\right)\right|



Bits error versus x



Bits error versus y



Bits error versus z
Initial program 1.6
Applied egg-rr1.6
Final simplification1.6
herbie shell --seed 2022172
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))