\frac{\left(1 - x\right) \cdot \left(3 - x\right)}{y \cdot 3}
\frac{\frac{1 - x}{y}}{\frac{3}{3 - x}}
(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 (- 3.0 x))))
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 / (3.0 - x));
}




Bits error versus x




Bits error versus y
Results
| Original | 5.8 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 5.8
Applied associate-/l*_binary640.3
Applied *-un-lft-identity_binary640.3
Applied times-frac_binary640.1
Applied associate-/r*_binary640.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2021274
(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)))