x + \frac{x - y}{2}x + \frac{x - y}{2}double f(double x, double y) {
double r640969 = x;
double r640970 = y;
double r640971 = r640969 - r640970;
double r640972 = 2.0;
double r640973 = r640971 / r640972;
double r640974 = r640969 + r640973;
return r640974;
}
double f(double x, double y) {
double r640975 = x;
double r640976 = y;
double r640977 = r640975 - r640976;
double r640978 = 2.0;
double r640979 = r640977 / r640978;
double r640980 = r640975 + r640979;
return r640980;
}




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