x + \frac{x - y}{2}\left(x + \frac{x}{2}\right) - \frac{y}{2}double f(double x, double y) {
double r427664 = x;
double r427665 = y;
double r427666 = r427664 - r427665;
double r427667 = 2.0;
double r427668 = r427666 / r427667;
double r427669 = r427664 + r427668;
return r427669;
}
double f(double x, double y) {
double r427670 = x;
double r427671 = 2.0;
double r427672 = r427670 / r427671;
double r427673 = r427670 + r427672;
double r427674 = y;
double r427675 = r427674 / r427671;
double r427676 = r427673 - r427675;
return r427676;
}




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