x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z \leq -4.761941483808026 \cdot 10^{+261} \lor \neg \left(y \cdot z \leq 8.455323020365894 \cdot 10^{+212}\right):\\
\;\;\;\;\left(y \cdot x\right) \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;x - \left(y \cdot z\right) \cdot x\\
\end{array}(FPCore (x y z) :precision binary64 (* x (- 1.0 (* y z))))
(FPCore (x y z)
:precision binary64
(if (or (<= (* y z) -4.761941483808026e+261)
(not (<= (* y z) 8.455323020365894e+212)))
(* (* y x) (- z))
(- x (* (* y z) x))))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 (((y * z) <= -4.761941483808026e+261) || !((y * z) <= 8.455323020365894e+212)) {
tmp = (y * x) * -z;
} else {
tmp = x - ((y * z) * x);
}
return tmp;
}








Bits error versus x








Bits error versus y








Bits error versus z
Results
| Alternative 1 | |
|---|---|
| Error | 4.8 |
| Cost | 769 |
| Alternative 2 | |
|---|---|
| Error | 20.0 |
| Cost | 1807 |
| Alternative 3 | |
|---|---|
| Error | 20.0 |
| Cost | 1242 |
| Alternative 4 | |
|---|---|
| Error | 25.9 |
| Cost | 64 |
| Alternative 5 | |
|---|---|
| Error | 61.8 |
| Cost | 64 |

if (*.f64 y z) < -4.761941483808026e261 or 8.45532302036589439e212 < (*.f64 y z) Initial program 33.4
rmApplied sub-neg_binary64_825533.4
Applied distribute-rgt-in_binary64_821233.4
Simplified33.4
Simplified33.4
rmApplied distribute-rgt-neg-in_binary64_822033.4
Applied associate-*r*_binary64_82020.9
Taylor expanded around inf 33.4
Simplified0.9
Simplified0.9
if -4.761941483808026e261 < (*.f64 y z) < 8.45532302036589439e212Initial program 0.1
rmApplied sub-neg_binary64_82550.1
Applied distribute-rgt-in_binary64_82120.1
Simplified0.1
Simplified0.1
Simplified0.1
Final simplification0.2
herbie shell --seed 2021044
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, I"
:precision binary64
(* x (- 1.0 (* y z))))