Average Error: 0.0 → 0.0
Time: 10.8s
Precision: 64
\[x + \frac{\left|y - x\right|}{2}\]
\[\frac{\left|y - x\right|}{2} + x\]
x + \frac{\left|y - x\right|}{2}
\frac{\left|y - x\right|}{2} + x
double f(double x, double y) {
        double r120922 = x;
        double r120923 = y;
        double r120924 = r120923 - r120922;
        double r120925 = fabs(r120924);
        double r120926 = 2.0;
        double r120927 = r120925 / r120926;
        double r120928 = r120922 + r120927;
        return r120928;
}

double f(double x, double y) {
        double r120929 = y;
        double r120930 = x;
        double r120931 = r120929 - r120930;
        double r120932 = fabs(r120931);
        double r120933 = 2.0;
        double r120934 = r120932 / r120933;
        double r120935 = r120934 + r120930;
        return r120935;
}

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 \frac{\left|y - x\right|}{2} + x\]

Reproduce

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