x \cdot \left(1 - \left(1 - y\right) \cdot z\right)
x \cdot \left(z \cdot \left(y - 1\right) + 1\right)
double f(double x, double y, double z) {
double r592748 = x;
double r592749 = 1.0;
double r592750 = y;
double r592751 = r592749 - r592750;
double r592752 = z;
double r592753 = r592751 * r592752;
double r592754 = r592749 - r592753;
double r592755 = r592748 * r592754;
return r592755;
}
double f(double x, double y, double z) {
double r592756 = x;
double r592757 = z;
double r592758 = y;
double r592759 = 1.0;
double r592760 = r592758 - r592759;
double r592761 = r592757 * r592760;
double r592762 = r592761 + r592759;
double r592763 = r592756 * r592762;
return r592763;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 3.6 |
|---|---|
| Target | 0.2 |
| Herbie | 3.6 |
if z < -7.801101333405402e-55 or 5.2427137483546105e-19 < z Initial program 7.8
rmApplied sub-neg7.8
Applied distribute-lft-in7.8
Simplified0.3
if -7.801101333405402e-55 < z < 5.2427137483546105e-19Initial program 0.1
rmApplied sub-neg0.1
Applied distribute-lft-in0.1
Simplified3.0
rmApplied sub-neg3.0
Applied distribute-rgt-in3.0
Applied associate-+r+3.0
Simplified0.1
Final simplification3.6
herbie shell --seed 2019294
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, J"
:precision binary64
:herbie-target
(if (< (* x (- 1 (* (- 1 y) z))) -1.618195973607049e50) (+ x (* (- 1 y) (* (- z) x))) (if (< (* x (- 1 (* (- 1 y) z))) 3.8922376496639029e134) (- (* (* x y) z) (- (* x z) x)) (+ x (* (- 1 y) (* (- z) x)))))
(* x (- 1 (* (- 1 y) z))))