x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)\left(y \cdot 4 - x \cdot 3\right) + -6 \cdot \left(\left(y - x\right) \cdot z\right)
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
(FPCore (x y z) :precision binary64 (+ (- (* y 4.0) (* x 3.0)) (* -6.0 (* (- y x) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
double code(double x, double y, double z) {
return ((y * 4.0) - (x * 3.0)) + (-6.0 * ((y - x) * z));
}








Bits error versus x








Bits error versus y








Bits error versus z
Results
| Alternative 1 | |
|---|---|
| Error | 0.2 |
| Cost | 704 |
| Alternative 2 | |
|---|---|
| Error | 0.4 |
| Cost | 704 |
| Alternative 3 | |
|---|---|
| Error | 1.8 |
| Cost | 1090 |
| Alternative 4 | |
|---|---|
| Error | 40.2 |
| Cost | 448 |
| Alternative 5 | |
|---|---|
| Error | 61.9 |
| Cost | 64 |

Initial program 0.4
Simplified0.4
Taylor expanded around 0 0.2
Simplified0.2
rmApplied associate-*r*_binary64_102480.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2021044
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, D"
:precision binary64
(+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))