Average Error: 0 → 0
Time: 1.4s
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 r10386275 = x;
        double r10386276 = y;
        double r10386277 = r10386275 + r10386276;
        double r10386278 = 2.0;
        double r10386279 = r10386277 / r10386278;
        return r10386279;
}

double f(double x, double y) {
        double r10386280 = y;
        double r10386281 = x;
        double r10386282 = r10386280 + r10386281;
        double r10386283 = 2.0;
        double r10386284 = r10386282 / r10386283;
        return r10386284;
}

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