x + \frac{x - y}{2}x + \frac{x - y}{2}double f(double x, double y) {
double r525799 = x;
double r525800 = y;
double r525801 = r525799 - r525800;
double r525802 = 2.0;
double r525803 = r525801 / r525802;
double r525804 = r525799 + r525803;
return r525804;
}
double f(double x, double y) {
double r525805 = x;
double r525806 = y;
double r525807 = r525805 - r525806;
double r525808 = 2.0;
double r525809 = r525807 / r525808;
double r525810 = r525805 + r525809;
return r525810;
}




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 2020001 +o rules:numerics
(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)))