Average Error: 0.0 → 0.0
Time: 3.6s
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 r130998 = x;
        double r130999 = y;
        double r131000 = r130999 - r130998;
        double r131001 = fabs(r131000);
        double r131002 = 2.0;
        double r131003 = r131001 / r131002;
        double r131004 = r130998 + r131003;
        return r131004;
}

double f(double x, double y) {
        double r131005 = x;
        double r131006 = y;
        double r131007 = r131006 - r131005;
        double r131008 = fabs(r131007);
        double r131009 = 2.0;
        double r131010 = r131008 / r131009;
        double r131011 = r131005 + r131010;
        return r131011;
}

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