x + \frac{x - y}{2}\left(x + \frac{x}{2}\right) - \frac{y}{2}double f(double x, double y) {
double r668107 = x;
double r668108 = y;
double r668109 = r668107 - r668108;
double r668110 = 2.0;
double r668111 = r668109 / r668110;
double r668112 = r668107 + r668111;
return r668112;
}
double f(double x, double y) {
double r668113 = x;
double r668114 = 2.0;
double r668115 = r668113 / r668114;
double r668116 = r668113 + r668115;
double r668117 = y;
double r668118 = r668117 / r668114;
double r668119 = r668116 - r668118;
return r668119;
}




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