x + \frac{x - y}{2}1.5 \cdot x - 0.5 \cdot y
double f(double x, double y) {
double r714002 = x;
double r714003 = y;
double r714004 = r714002 - r714003;
double r714005 = 2.0;
double r714006 = r714004 / r714005;
double r714007 = r714002 + r714006;
return r714007;
}
double f(double x, double y) {
double r714008 = 1.5;
double r714009 = x;
double r714010 = r714008 * r714009;
double r714011 = 0.5;
double r714012 = y;
double r714013 = r714011 * r714012;
double r714014 = r714010 - r714013;
return r714014;
}




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