x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;x \cdot \left(1 - y \cdot z\right) \leq -\infty:\\
\;\;\;\;z \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;x \cdot \left(1 - y \cdot z\right) \leq 7.270083822933438 \cdot 10^{+307}:\\
\;\;\;\;x - x \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \left(x \cdot z\right)\\
\end{array}(FPCore (x y z) :precision binary64 (* x (- 1.0 (* y z))))
(FPCore (x y z)
:precision binary64
(if (<= (* x (- 1.0 (* y z))) (- INFINITY))
(* z (* x (- y)))
(if (<= (* x (- 1.0 (* y z))) 7.270083822933438e+307)
(- x (* x (* y z)))
(- x (* y (* x 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.0 - (y * z))) <= -((double) INFINITY)) {
tmp = z * (x * -y);
} else if ((x * (1.0 - (y * z))) <= 7.270083822933438e+307) {
tmp = x - (x * (y * z));
} else {
tmp = x - (y * (x * z));
}
return tmp;
}



Bits error versus x



Bits error versus y



Bits error versus z
Results
if (*.f64 x (-.f64 1 (*.f64 y z))) < -inf.0Initial program 64.0
Taylor expanded around inf 64.0
Simplified0.3
if -inf.0 < (*.f64 x (-.f64 1 (*.f64 y z))) < 7.2700838229334382e307Initial program 0.1
Simplified0.1
if 7.2700838229334382e307 < (*.f64 x (-.f64 1 (*.f64 y z))) Initial program 63.1
Simplified0.3
Final simplification0.1
herbie shell --seed 2021176
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, I"
:precision binary64
(* x (- 1.0 (* y z))))