Average Error: 0.0 → 0.0
Time: 6.3s
Precision: 64
\[x + \frac{\left|y - x\right|}{2}\]
\[x + \frac{\left|y - x\right|}{2}\]
x + \frac{\left|y - x\right|}{2}
x + \frac{\left|y - x\right|}{2}
double f(double x, double y) {
        double r199249 = x;
        double r199250 = y;
        double r199251 = r199250 - r199249;
        double r199252 = fabs(r199251);
        double r199253 = 2.0;
        double r199254 = r199252 / r199253;
        double r199255 = r199249 + r199254;
        return r199255;
}

double f(double x, double y) {
        double r199256 = x;
        double r199257 = y;
        double r199258 = r199257 - r199256;
        double r199259 = fabs(r199258);
        double r199260 = 2.0;
        double r199261 = r199259 / r199260;
        double r199262 = r199256 + r199261;
        return r199262;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[x + \frac{\left|y - x\right|}{2}\]
  2. Final simplification0.0

    \[\leadsto x + \frac{\left|y - x\right|}{2}\]

Reproduce

herbie shell --seed 2020046 
(FPCore (x y)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderSpotLegend from Chart-1.5.3"
  :precision binary64
  (+ x (/ (fabs (- y x)) 2)))