Average Error: 0 → 0
Time: 1.0s
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 r7641477 = x;
        double r7641478 = y;
        double r7641479 = r7641477 + r7641478;
        double r7641480 = 2.0;
        double r7641481 = r7641479 / r7641480;
        return r7641481;
}

double f(double x, double y) {
        double r7641482 = y;
        double r7641483 = x;
        double r7641484 = r7641482 + r7641483;
        double r7641485 = 2.0;
        double r7641486 = r7641484 / r7641485;
        return r7641486;
}

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))