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












Bits error versus x












Bits error versus y
Results
| Original | 5.5 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
| Alternative 1 | |
|---|---|
| Error | 0.2 |
| Cost | 704 |
| Alternative 2 | |
|---|---|
| Error | 1.5 |
| Cost | 1218 |
| Alternative 3 | |
|---|---|
| Error | 2.0 |
| Cost | 1218 |
| Alternative 4 | |
|---|---|
| Error | 2.1 |
| Cost | 1090 |
| Alternative 5 | |
|---|---|
| Error | 2.1 |
| Cost | 776 |
| Alternative 6 | |
|---|---|
| Error | 20.8 |
| Cost | 192 |
| Alternative 7 | |
|---|---|
| Error | 60.6 |
| Cost | 385 |
| Alternative 8 | |
|---|---|
| Error | 61.8 |
| Cost | 64 |

Initial program 5.5
rmApplied associate-/l*_binary64_129810.3
Simplified0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2021044
(FPCore (x y)
:name "Diagrams.TwoD.Arc:bezierFromSweepQ1 from diagrams-lib-1.3.0.3"
:precision binary64
:herbie-target
(* (/ (- 1.0 x) y) (/ (- 3.0 x) 3.0))
(/ (* (- 1.0 x) (- 3.0 x)) (* y 3.0)))