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




Bits error versus x




Bits error versus y
Results
| Original | 5.6 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program Error: 5.6 bits
SimplifiedError: 0.4 bits
rmApplied clear-numError: 0.3 bits
SimplifiedError: 0.2 bits
rmApplied un-div-invError: 0.1 bits
Final simplificationError: 0.1 bits
herbie shell --seed 2020204
(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)))