x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z \le -9.4784527118034269 \cdot 10^{188}:\\
\;\;\;\;x \cdot 1 + \left(x \cdot \left(-y\right)\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot z\right) + x \cdot \mathsf{fma}\left(-z, y, z \cdot y\right)\\
\end{array}double code(double x, double y, double z) {
return (x * (1.0 - (y * z)));
}
double code(double x, double y, double z) {
double VAR;
if (((y * z) <= -9.478452711803427e+188)) {
VAR = ((x * 1.0) + ((x * -y) * z));
} else {
VAR = ((x * (1.0 - (y * z))) + (x * fma(-z, y, (z * y))));
}
return VAR;
}



Bits error versus x



Bits error versus y



Bits error versus z
Results
if (* y z) < -9.478452711803427e+188Initial program 25.8
rmApplied sub-neg25.8
Applied distribute-lft-in25.8
rmApplied distribute-lft-neg-in25.8
Applied associate-*r*1.6
if -9.478452711803427e+188 < (* y z) Initial program 1.8
rmApplied add-cube-cbrt1.8
Applied prod-diff1.8
Applied distribute-lft-in1.7
Simplified1.7
Final simplification1.7
herbie shell --seed 2020102 +o rules:numerics
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, I"
:precision binary64
(* x (- 1 (* y z))))