(FPCore (x y z) :precision binary64 (* x (- 1.0 (* y z))))
(FPCore (x y z)
:precision binary64
(if (<= x -1.6898890574526774e-119)
(fma -1.0 (* x (* y z)) x)
(if (<= x 1.0343249380691399e-209)
(- x (* y (* x z)))
(* x (- 1.0 (* y z))))))double code(double x, double y, double z) {
return x * (1.0 - (y * z));
}
double code(double x, double y, double z) {
double tmp;
if (x <= -1.6898890574526774e-119) {
tmp = fma(-1.0, (x * (y * z)), x);
} else if (x <= 1.0343249380691399e-209) {
tmp = x - (y * (x * z));
} else {
tmp = x * (1.0 - (y * z));
}
return tmp;
}
function code(x, y, z) return Float64(x * Float64(1.0 - Float64(y * z))) end
function code(x, y, z) tmp = 0.0 if (x <= -1.6898890574526774e-119) tmp = fma(-1.0, Float64(x * Float64(y * z)), x); elseif (x <= 1.0343249380691399e-209) tmp = Float64(x - Float64(y * Float64(x * z))); else tmp = Float64(x * Float64(1.0 - Float64(y * z))); end return tmp end
code[x_, y_, z_] := N[(x * N[(1.0 - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := If[LessEqual[x, -1.6898890574526774e-119], N[(-1.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[x, 1.0343249380691399e-209], N[(x - N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;x \leq -1.6898890574526774 \cdot 10^{-119}:\\
\;\;\;\;\mathsf{fma}\left(-1, x \cdot \left(y \cdot z\right), x\right)\\
\mathbf{elif}\;x \leq 1.0343249380691399 \cdot 10^{-209}:\\
\;\;\;\;x - y \cdot \left(x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot z\right)\\
\end{array}



Bits error versus x



Bits error versus y



Bits error versus z
if x < -1.6898890574526774e-119Initial program 1.3
Taylor expanded in x around 0 1.3
Simplified5.2
Applied egg-rr55.1
Applied egg-rr1.3
if -1.6898890574526774e-119 < x < 1.03432493806913992e-209Initial program 7.4
Taylor expanded in x around 0 7.4
Simplified4.3
if 1.03432493806913992e-209 < x Initial program 2.1
Final simplification2.5
herbie shell --seed 2022150
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, I"
:precision binary64
(* x (- 1.0 (* y z))))