Average Error: 0.0 → 0.0
Time: 12.9s
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 r126497 = x;
        double r126498 = y;
        double r126499 = r126498 - r126497;
        double r126500 = fabs(r126499);
        double r126501 = 2.0;
        double r126502 = r126500 / r126501;
        double r126503 = r126497 + r126502;
        return r126503;
}

double f(double x, double y) {
        double r126504 = x;
        double r126505 = y;
        double r126506 = r126505 - r126504;
        double r126507 = fabs(r126506);
        double r126508 = 2.0;
        double r126509 = r126507 / r126508;
        double r126510 = r126504 + r126509;
        return r126510;
}

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