x + \frac{x - y}{2}\left(x + \frac{x}{2}\right) - \frac{y}{2}double f(double x, double y) {
double r698846 = x;
double r698847 = y;
double r698848 = r698846 - r698847;
double r698849 = 2.0;
double r698850 = r698848 / r698849;
double r698851 = r698846 + r698850;
return r698851;
}
double f(double x, double y) {
double r698852 = x;
double r698853 = 2.0;
double r698854 = r698852 / r698853;
double r698855 = r698852 + r698854;
double r698856 = y;
double r698857 = r698856 / r698853;
double r698858 = r698855 - r698857;
return r698858;
}




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