Average Error: 0 → 0
Time: 1.7s
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 r10191874 = x;
        double r10191875 = y;
        double r10191876 = r10191874 + r10191875;
        double r10191877 = 2.0;
        double r10191878 = r10191876 / r10191877;
        return r10191878;
}

double f(double x, double y) {
        double r10191879 = y;
        double r10191880 = x;
        double r10191881 = r10191879 + r10191880;
        double r10191882 = 2.0;
        double r10191883 = r10191881 / r10191882;
        return r10191883;
}

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 2019168 +o rules:numerics
(FPCore (x y)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, A"
  (/ (+ x y) 2.0))