Average Error: 0 → 0
Time: 343.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 r276510 = x;
        double r276511 = y;
        double r276512 = r276510 + r276511;
        double r276513 = 2.0;
        double r276514 = r276512 / r276513;
        return r276514;
}

double f(double x, double y) {
        double r276515 = x;
        double r276516 = y;
        double r276517 = r276515 + r276516;
        double r276518 = 2.0;
        double r276519 = r276517 / r276518;
        return r276519;
}

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