Average Error: 0 → 0
Time: 884.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 r9609837 = x;
        double r9609838 = y;
        double r9609839 = r9609837 + r9609838;
        double r9609840 = 2.0;
        double r9609841 = r9609839 / r9609840;
        return r9609841;
}

double f(double x, double y) {
        double r9609842 = y;
        double r9609843 = x;
        double r9609844 = r9609842 + r9609843;
        double r9609845 = 2.0;
        double r9609846 = r9609844 / r9609845;
        return r9609846;
}

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