Average Error: 0.0 → 0.0
Time: 2.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 r185499 = x;
        double r185500 = y;
        double r185501 = r185500 - r185499;
        double r185502 = fabs(r185501);
        double r185503 = 2.0;
        double r185504 = r185502 / r185503;
        double r185505 = r185499 + r185504;
        return r185505;
}

double f(double x, double y) {
        double r185506 = x;
        double r185507 = y;
        double r185508 = r185507 - r185506;
        double r185509 = fabs(r185508);
        double r185510 = 2.0;
        double r185511 = r185509 / r185510;
        double r185512 = r185506 + r185511;
        return r185512;
}

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