\frac{\left(1 - x\right) \cdot \left(3 - x\right)}{y \cdot 3}\frac{1 - x}{y \cdot \frac{3}{3 - x}}double f(double x, double y) {
double r445951 = 1.0;
double r445952 = x;
double r445953 = r445951 - r445952;
double r445954 = 3.0;
double r445955 = r445954 - r445952;
double r445956 = r445953 * r445955;
double r445957 = y;
double r445958 = r445957 * r445954;
double r445959 = r445956 / r445958;
return r445959;
}
double f(double x, double y) {
double r445960 = 1.0;
double r445961 = x;
double r445962 = r445960 - r445961;
double r445963 = y;
double r445964 = 3.0;
double r445965 = r445964 - r445961;
double r445966 = r445964 / r445965;
double r445967 = r445963 * r445966;
double r445968 = r445962 / r445967;
return r445968;
}




Bits error versus x




Bits error versus y
Results
| Original | 5.9 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 5.9
rmApplied times-frac0.1
rmApplied clear-num0.2
rmApplied frac-times0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2019209
(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)))