Average Error: 0 → 0
Time: 358.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 r275389 = x;
        double r275390 = y;
        double r275391 = r275389 + r275390;
        double r275392 = 2.0;
        double r275393 = r275391 / r275392;
        return r275393;
}

double f(double x, double y) {
        double r275394 = x;
        double r275395 = y;
        double r275396 = r275394 + r275395;
        double r275397 = 2.0;
        double r275398 = r275396 / r275397;
        return r275398;
}

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