Average Error: 0.0 → 0.0
Time: 7.1s
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 r188307 = x;
        double r188308 = y;
        double r188309 = r188308 - r188307;
        double r188310 = fabs(r188309);
        double r188311 = 2.0;
        double r188312 = r188310 / r188311;
        double r188313 = r188307 + r188312;
        return r188313;
}

double f(double x, double y) {
        double r188314 = x;
        double r188315 = y;
        double r188316 = r188315 - r188314;
        double r188317 = fabs(r188316);
        double r188318 = 2.0;
        double r188319 = r188317 / r188318;
        double r188320 = r188314 + r188319;
        return r188320;
}

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