Average Error: 0 → 0
Time: 672.0ms
Precision: 64
\[\frac{x + y}{2.0}\]
\[\frac{y + x}{2.0}\]
\frac{x + y}{2.0}
\frac{y + x}{2.0}
double f(double x, double y) {
        double r4556711 = x;
        double r4556712 = y;
        double r4556713 = r4556711 + r4556712;
        double r4556714 = 2.0;
        double r4556715 = r4556713 / r4556714;
        return r4556715;
}

double f(double x, double y) {
        double r4556716 = y;
        double r4556717 = x;
        double r4556718 = r4556716 + r4556717;
        double r4556719 = 2.0;
        double r4556720 = r4556718 / r4556719;
        return r4556720;
}

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.0}\]
  2. Final simplification0

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

Reproduce

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