x + \left(1 - x\right) \cdot \left(1 - y\right)
\left(1 - y\right) + y \cdot x
(FPCore (x y) :precision binary64 (+ x (* (- 1.0 x) (- 1.0 y))))
(FPCore (x y) :precision binary64 (+ (- 1.0 y) (* y x)))
double code(double x, double y) {
return x + ((1.0 - x) * (1.0 - y));
}
double code(double x, double y) {
return (1.0 - y) + (y * x);
}

















Bits error versus x

















Bits error versus y
Results
| Original | 16.7 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
| Alternative 1 | |
|---|---|
| Error | 26.0 |
| Cost | 60736 |
| Alternative 2 | |
|---|---|
| Error | 25.8 |
| Cost | 14656 |
| Alternative 3 | |
|---|---|
| Error | 21.3 |
| Cost | 3008 |
| Alternative 4 | |
|---|---|
| Error | 50.7 |
| Cost | 2112 |
| Alternative 5 | |
|---|---|
| Error | 57.0 |
| Cost | 1600 |
| Alternative 6 | |
|---|---|
| Error | 30.9 |
| Cost | 1472 |
| Alternative 7 | |
|---|---|
| Error | 16.7 |
| Cost | 576 |
| Alternative 8 | |
|---|---|
| Error | 27.0 |
| Cost | 320 |
| Alternative 9 | |
|---|---|
| Error | 44.4 |
| Cost | 192 |
| Alternative 10 | |
|---|---|
| Error | 18.9 |
| Cost | 192 |
| Alternative 11 | |
|---|---|
| Error | 36.2 |
| Cost | 64 |
| Alternative 12 | |
|---|---|
| Error | 62.3 |
| Cost | 64 |
| Alternative 13 | |
|---|---|
| Error | 62.4 |
| Cost | 64 |

Initial program 16.7
Simplified0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2021042
(FPCore (x y)
:name "Graphics.Rendering.Chart.Plot.Vectors:renderPlotVectors from Chart-1.5.3"
:precision binary64
:herbie-target
(- (* y x) (- y 1.0))
(+ x (* (- 1.0 x) (- 1.0 y))))