Average Error: 0.0 → 0.0
Time: 13.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 r125840 = x;
        double r125841 = y;
        double r125842 = r125841 - r125840;
        double r125843 = fabs(r125842);
        double r125844 = 2.0;
        double r125845 = r125843 / r125844;
        double r125846 = r125840 + r125845;
        return r125846;
}

double f(double x, double y) {
        double r125847 = x;
        double r125848 = y;
        double r125849 = r125848 - r125847;
        double r125850 = fabs(r125849);
        double r125851 = 2.0;
        double r125852 = r125850 / r125851;
        double r125853 = r125847 + r125852;
        return r125853;
}

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