Average Error: 0 → 0
Time: 677.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 r138209 = x;
        double r138210 = y;
        double r138211 = r138209 + r138210;
        double r138212 = 2.0;
        double r138213 = r138211 / r138212;
        return r138213;
}

double f(double x, double y) {
        double r138214 = x;
        double r138215 = y;
        double r138216 = r138214 + r138215;
        double r138217 = 2.0;
        double r138218 = r138216 / r138217;
        return r138218;
}

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