Average Error: 0 → 0
Time: 936.0ms
Precision: 64
\[\frac{x + y}{2}\]
\[\frac{x + y}{2}\]
\frac{x + y}{2}
\frac{x + y}{2}
double f(double x, double y) {
        double r194425 = x;
        double r194426 = y;
        double r194427 = r194425 + r194426;
        double r194428 = 2.0;
        double r194429 = r194427 / r194428;
        return r194429;
}

double f(double x, double y) {
        double r194430 = x;
        double r194431 = y;
        double r194432 = r194430 + r194431;
        double r194433 = 2.0;
        double r194434 = r194432 / r194433;
        return r194434;
}

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. Simplified0

    \[\leadsto \color{blue}{\frac{y + x}{2}}\]
  3. Final simplification0

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

Reproduce

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