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



Bits error versus x



Bits error versus y



Bits error versus z
if (*.f64 y z) < -2.00000000000000001e277 or 2.0000000000000001e242 < (*.f64 y z) Initial program 41.8
Taylor expanded in y around inf 0.4
Simplified0.4
if -2.00000000000000001e277 < (*.f64 y z) < 2.0000000000000001e242Initial program 0.1
Applied egg-rr1.4
Applied egg-rr0.5
Applied egg-rr0.1
Final simplification0.1
herbie shell --seed 2022160
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, I"
:precision binary64
(* x (- 1.0 (* y z))))