Average Error: 0.1 → 0.1
Time: 8.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 r192677 = x;
        double r192678 = y;
        double r192679 = r192678 - r192677;
        double r192680 = fabs(r192679);
        double r192681 = 2.0;
        double r192682 = r192680 / r192681;
        double r192683 = r192677 + r192682;
        return r192683;
}

double f(double x, double y) {
        double r192684 = x;
        double r192685 = y;
        double r192686 = r192685 - r192684;
        double r192687 = fabs(r192686);
        double r192688 = 2.0;
        double r192689 = r192687 / r192688;
        double r192690 = r192684 + r192689;
        return r192690;
}

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.1

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

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

Reproduce

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