Average Error: 0 → 0
Time: 433.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 r297400 = x;
        double r297401 = y;
        double r297402 = r297400 + r297401;
        double r297403 = 2.0;
        double r297404 = r297402 / r297403;
        return r297404;
}

double f(double x, double y) {
        double r297405 = x;
        double r297406 = y;
        double r297407 = r297405 + r297406;
        double r297408 = 2.0;
        double r297409 = r297407 / r297408;
        return r297409;
}

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{x + y}{2}\]

Reproduce

herbie shell --seed 2020034 +o rules:numerics
(FPCore (x y)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, A"
  :precision binary64
  (/ (+ x y) 2))