Average Error: 0.0 → 0.0
Time: 10.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 r119036 = x;
        double r119037 = y;
        double r119038 = r119037 - r119036;
        double r119039 = fabs(r119038);
        double r119040 = 2.0;
        double r119041 = r119039 / r119040;
        double r119042 = r119036 + r119041;
        return r119042;
}

double f(double x, double y) {
        double r119043 = x;
        double r119044 = y;
        double r119045 = r119044 - r119043;
        double r119046 = fabs(r119045);
        double r119047 = 2.0;
        double r119048 = r119046 / r119047;
        double r119049 = r119043 + r119048;
        return r119049;
}

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