x + \frac{x - y}{2}x + \frac{x - y}{2}double f(double x, double y) {
double r617700 = x;
double r617701 = y;
double r617702 = r617700 - r617701;
double r617703 = 2.0;
double r617704 = r617702 / r617703;
double r617705 = r617700 + r617704;
return r617705;
}
double f(double x, double y) {
double r617706 = x;
double r617707 = y;
double r617708 = r617706 - r617707;
double r617709 = 2.0;
double r617710 = r617708 / r617709;
double r617711 = r617706 + r617710;
return r617711;
}




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