x + \frac{x - y}{2}x + \frac{x - y}{2}double f(double x, double y) {
double r24270863 = x;
double r24270864 = y;
double r24270865 = r24270863 - r24270864;
double r24270866 = 2.0;
double r24270867 = r24270865 / r24270866;
double r24270868 = r24270863 + r24270867;
return r24270868;
}
double f(double x, double y) {
double r24270869 = x;
double r24270870 = y;
double r24270871 = r24270869 - r24270870;
double r24270872 = 2.0;
double r24270873 = r24270871 / r24270872;
double r24270874 = r24270869 + r24270873;
return r24270874;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 0.1
Final simplification0.1
herbie shell --seed 2019174 +o rules:numerics
(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)))