Average Error: 0.0 → 0.0
Time: 11.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 r108470 = x;
        double r108471 = y;
        double r108472 = r108471 - r108470;
        double r108473 = fabs(r108472);
        double r108474 = 2.0;
        double r108475 = r108473 / r108474;
        double r108476 = r108470 + r108475;
        return r108476;
}

double f(double x, double y) {
        double r108477 = x;
        double r108478 = y;
        double r108479 = r108478 - r108477;
        double r108480 = fabs(r108479);
        double r108481 = 2.0;
        double r108482 = r108480 / r108481;
        double r108483 = r108477 + r108482;
        return r108483;
}

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