x + \frac{x - y}{2}\left(x + \frac{x}{2}\right) - \frac{y}{2}double f(double x, double y) {
double r656720 = x;
double r656721 = y;
double r656722 = r656720 - r656721;
double r656723 = 2.0;
double r656724 = r656722 / r656723;
double r656725 = r656720 + r656724;
return r656725;
}
double f(double x, double y) {
double r656726 = x;
double r656727 = 2.0;
double r656728 = r656726 / r656727;
double r656729 = r656726 + r656728;
double r656730 = y;
double r656731 = r656730 / r656727;
double r656732 = r656729 - r656731;
return r656732;
}




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 2019354
(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)))