Average Error: 0.0 → 0.0
Time: 13.7s
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 r99835 = x;
        double r99836 = y;
        double r99837 = r99836 - r99835;
        double r99838 = fabs(r99837);
        double r99839 = 2.0;
        double r99840 = r99838 / r99839;
        double r99841 = r99835 + r99840;
        return r99841;
}

double f(double x, double y) {
        double r99842 = x;
        double r99843 = y;
        double r99844 = r99843 - r99842;
        double r99845 = fabs(r99844);
        double r99846 = 2.0;
        double r99847 = r99845 / r99846;
        double r99848 = r99842 + r99847;
        return r99848;
}

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