(FPCore (x y z) :precision binary64 (* x (- 1.0 (* y z))))
(FPCore (x y z) :precision binary64 (* x (fma y (- z) 1.0)))
double code(double x, double y, double z) {
return x * (1.0 - (y * z));
}
double code(double x, double y, double z) {
return x * fma(y, -z, 1.0);
}
function code(x, y, z) return Float64(x * Float64(1.0 - Float64(y * z))) end
function code(x, y, z) return Float64(x * fma(y, Float64(-z), 1.0)) end
code[x_, y_, z_] := N[(x * N[(1.0 - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := N[(x * N[(y * (-z) + 1.0), $MachinePrecision]), $MachinePrecision]
x \cdot \left(1 - y \cdot z\right)
x \cdot \mathsf{fma}\left(y, -z, 1\right)



Bits error versus x



Bits error versus y



Bits error versus z
Initial program 3.1
Applied egg-rr4.3
Applied egg-rr3.4
Taylor expanded in y around 0 4.4
Simplified3.1
Final simplification3.1
herbie shell --seed 2022162
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, I"
:precision binary64
(* x (- 1.0 (* y z))))