x + \frac{x - y}{2}\left(x + \frac{x}{2}\right) - \frac{y}{2}double f(double x, double y) {
double r685066 = x;
double r685067 = y;
double r685068 = r685066 - r685067;
double r685069 = 2.0;
double r685070 = r685068 / r685069;
double r685071 = r685066 + r685070;
return r685071;
}
double f(double x, double y) {
double r685072 = x;
double r685073 = 2.0;
double r685074 = r685072 / r685073;
double r685075 = r685072 + r685074;
double r685076 = y;
double r685077 = r685076 / r685073;
double r685078 = r685075 - r685077;
return r685078;
}




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