Average Error: 0 → 0
Time: 825.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 r150333 = x;
        double r150334 = y;
        double r150335 = r150333 + r150334;
        double r150336 = 2.0;
        double r150337 = r150335 / r150336;
        return r150337;
}

double f(double x, double y) {
        double r150338 = y;
        double r150339 = x;
        double r150340 = r150338 + r150339;
        double r150341 = 2.0;
        double r150342 = r150340 / r150341;
        return r150342;
}

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