Average Error: 0 → 0
Time: 716.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 r193289 = x;
        double r193290 = y;
        double r193291 = r193289 + r193290;
        double r193292 = 2.0;
        double r193293 = r193291 / r193292;
        return r193293;
}

double f(double x, double y) {
        double r193294 = x;
        double r193295 = y;
        double r193296 = r193294 + r193295;
        double r193297 = 2.0;
        double r193298 = r193296 / r193297;
        return r193298;
}

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