x + \frac{x - y}{2}\left(x + \frac{x}{2}\right) - \frac{y}{2}double f(double x, double y) {
double r427844 = x;
double r427845 = y;
double r427846 = r427844 - r427845;
double r427847 = 2.0;
double r427848 = r427846 / r427847;
double r427849 = r427844 + r427848;
return r427849;
}
double f(double x, double y) {
double r427850 = x;
double r427851 = 2.0;
double r427852 = r427850 / r427851;
double r427853 = r427850 + r427852;
double r427854 = y;
double r427855 = r427854 / r427851;
double r427856 = r427853 - r427855;
return r427856;
}




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