x + \frac{x - y}{2}\left(x + \frac{x}{2}\right) - \frac{y}{2}double f(double x, double y) {
double r528833 = x;
double r528834 = y;
double r528835 = r528833 - r528834;
double r528836 = 2.0;
double r528837 = r528835 / r528836;
double r528838 = r528833 + r528837;
return r528838;
}
double f(double x, double y) {
double r528839 = x;
double r528840 = 2.0;
double r528841 = r528839 / r528840;
double r528842 = r528839 + r528841;
double r528843 = y;
double r528844 = r528843 / r528840;
double r528845 = r528842 - r528844;
return r528845;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 0.1
rmApplied div-sub0.1
Applied associate-+r-0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2019179
(FPCore (x y)
:name "Graphics.Rendering.Chart.Axis.Types:hBufferRect from Chart-1.5.3"
:herbie-target
(- (* 1.5 x) (* 0.5 y))
(+ x (/ (- x y) 2.0)))