Average Error: 0 → 0
Time: 843.0ms
Precision: 64
\[\frac{x + y}{2}\]
\[\frac{y + x}{2}\]
\frac{x + y}{2}
\frac{y + x}{2}
double f(double x, double y) {
        double r254776 = x;
        double r254777 = y;
        double r254778 = r254776 + r254777;
        double r254779 = 2.0;
        double r254780 = r254778 / r254779;
        return r254780;
}

double f(double x, double y) {
        double r254781 = y;
        double r254782 = x;
        double r254783 = r254781 + r254782;
        double r254784 = 2.0;
        double r254785 = r254783 / r254784;
        return r254785;
}

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

    \[\frac{x + y}{2}\]
  2. Final simplification0

    \[\leadsto \frac{y + x}{2}\]

Reproduce

herbie shell --seed 2019174 
(FPCore (x y)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, A"
  (/ (+ x y) 2.0))