x + \frac{x - y}{2}\left(x + \frac{x}{2}\right) - \frac{y}{2}double f(double x, double y) {
double r939845 = x;
double r939846 = y;
double r939847 = r939845 - r939846;
double r939848 = 2.0;
double r939849 = r939847 / r939848;
double r939850 = r939845 + r939849;
return r939850;
}
double f(double x, double y) {
double r939851 = x;
double r939852 = 2.0;
double r939853 = r939851 / r939852;
double r939854 = r939851 + r939853;
double r939855 = y;
double r939856 = r939855 / r939852;
double r939857 = r939854 - r939856;
return r939857;
}




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