\frac{\left(1 - x\right) \cdot \left(3 - x\right)}{y \cdot 3}\frac{\frac{1 - x}{y}}{\frac{3}{3 - x}}double f(double x, double y) {
double r544013 = 1.0;
double r544014 = x;
double r544015 = r544013 - r544014;
double r544016 = 3.0;
double r544017 = r544016 - r544014;
double r544018 = r544015 * r544017;
double r544019 = y;
double r544020 = r544019 * r544016;
double r544021 = r544018 / r544020;
return r544021;
}
double f(double x, double y) {
double r544022 = 1.0;
double r544023 = x;
double r544024 = r544022 - r544023;
double r544025 = y;
double r544026 = r544024 / r544025;
double r544027 = 3.0;
double r544028 = r544027 - r544023;
double r544029 = r544027 / r544028;
double r544030 = r544026 / r544029;
return r544030;
}




Bits error versus x




Bits error versus y
Results
| Original | 5.7 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 5.7
rmApplied times-frac0.1
rmApplied clear-num0.2
rmApplied un-div-inv0.1
Final simplification0.1
herbie shell --seed 2019303
(FPCore (x y)
:name "Diagrams.TwoD.Arc:bezierFromSweepQ1 from diagrams-lib-1.3.0.3"
:precision binary64
:herbie-target
(* (/ (- 1 x) y) (/ (- 3 x) 3))
(/ (* (- 1 x) (- 3 x)) (* y 3)))