x + \frac{x - y}{2}\left(x + \frac{x}{2}\right) - \frac{y}{2}double f(double x, double y) {
double r654700 = x;
double r654701 = y;
double r654702 = r654700 - r654701;
double r654703 = 2.0;
double r654704 = r654702 / r654703;
double r654705 = r654700 + r654704;
return r654705;
}
double f(double x, double y) {
double r654706 = x;
double r654707 = 2.0;
double r654708 = r654706 / r654707;
double r654709 = r654706 + r654708;
double r654710 = y;
double r654711 = r654710 / r654707;
double r654712 = r654709 - r654711;
return r654712;
}




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
Final simplification0.1
herbie shell --seed 2020081
(FPCore (x y)
:name "Graphics.Rendering.Chart.Axis.Types:hBufferRect from Chart-1.5.3"
:precision binary64
:herbie-target
(- (* 1.5 x) (* 0.5 y))
(+ x (/ (- x y) 2)))