Average Error: 0 → 0
Time: 316.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 r360051 = x;
        double r360052 = y;
        double r360053 = r360051 + r360052;
        double r360054 = 2.0;
        double r360055 = r360053 / r360054;
        return r360055;
}

double f(double x, double y) {
        double r360056 = x;
        double r360057 = y;
        double r360058 = r360056 + r360057;
        double r360059 = 2.0;
        double r360060 = r360058 / r360059;
        return r360060;
}

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