Average Error: 0.0 → 0.0
Time: 5.2s
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 r176192 = x;
        double r176193 = y;
        double r176194 = r176193 - r176192;
        double r176195 = fabs(r176194);
        double r176196 = 2.0;
        double r176197 = r176195 / r176196;
        double r176198 = r176192 + r176197;
        return r176198;
}

double f(double x, double y) {
        double r176199 = x;
        double r176200 = y;
        double r176201 = r176200 - r176199;
        double r176202 = fabs(r176201);
        double r176203 = 2.0;
        double r176204 = r176202 / r176203;
        double r176205 = r176199 + r176204;
        return r176205;
}

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