Average Error: 0 → 0
Time: 839.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 r8550493 = x;
        double r8550494 = y;
        double r8550495 = r8550493 + r8550494;
        double r8550496 = 2.0;
        double r8550497 = r8550495 / r8550496;
        return r8550497;
}

double f(double x, double y) {
        double r8550498 = y;
        double r8550499 = x;
        double r8550500 = r8550498 + r8550499;
        double r8550501 = 2.0;
        double r8550502 = r8550500 / r8550501;
        return r8550502;
}

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