Average Error: 0.0 → 0.0
Time: 6.1s
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 r190999 = x;
        double r191000 = y;
        double r191001 = r191000 - r190999;
        double r191002 = fabs(r191001);
        double r191003 = 2.0;
        double r191004 = r191002 / r191003;
        double r191005 = r190999 + r191004;
        return r191005;
}

double f(double x, double y) {
        double r191006 = x;
        double r191007 = y;
        double r191008 = r191007 - r191006;
        double r191009 = fabs(r191008);
        double r191010 = 2.0;
        double r191011 = r191009 / r191010;
        double r191012 = r191006 + r191011;
        return r191012;
}

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