Average Error: 0.0 → 0.0
Time: 2.8s
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 r203394 = x;
        double r203395 = y;
        double r203396 = r203395 - r203394;
        double r203397 = fabs(r203396);
        double r203398 = 2.0;
        double r203399 = r203397 / r203398;
        double r203400 = r203394 + r203399;
        return r203400;
}

double f(double x, double y) {
        double r203401 = x;
        double r203402 = y;
        double r203403 = r203402 - r203401;
        double r203404 = fabs(r203403);
        double r203405 = 2.0;
        double r203406 = r203404 / r203405;
        double r203407 = r203401 + r203406;
        return r203407;
}

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 2019356 
(FPCore (x y)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderSpotLegend from Chart-1.5.3"
  :precision binary64
  (+ x (/ (fabs (- y x)) 2)))