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










Bits error versus x










Bits error versus y










Bits error versus z
Results
| Alternative 1 | |
|---|---|
| Error | 0.0 |
| Cost | 448 |
| Alternative 2 | |
|---|---|
| Error | 1.5 |
| Cost | 648 |
| Alternative 3 | |
|---|---|
| Error | 7.3 |
| Cost | 648 |
| Alternative 4 | |
|---|---|
| Error | 12.0 |
| Cost | 320 |
| Alternative 5 | |
|---|---|
| Error | 29.4 |
| Cost | 785 |
| Alternative 6 | |
|---|---|
| Error | 35.0 |
| Cost | 128 |
| Alternative 7 | |
|---|---|
| Error | 61.8 |
| Cost | 64 |

Initial program 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2021044
(FPCore (x y z)
:name "Graphics.Rendering.Chart.Drawing:drawTextsR from Chart-1.5.3"
:precision binary64
(+ (* x y) (* (- x 1.0) z)))