x + \frac{x - y}{2}1.5 \cdot x - 0.5 \cdot y
double f(double x, double y) {
double r755834 = x;
double r755835 = y;
double r755836 = r755834 - r755835;
double r755837 = 2.0;
double r755838 = r755836 / r755837;
double r755839 = r755834 + r755838;
return r755839;
}
double f(double x, double y) {
double r755840 = 1.5;
double r755841 = x;
double r755842 = r755840 * r755841;
double r755843 = 0.5;
double r755844 = y;
double r755845 = r755843 * r755844;
double r755846 = r755842 - r755845;
return r755846;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 0.1
Taylor expanded around 0 0.1
Final simplification0.1
herbie shell --seed 2020089
(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)))