Average Error: 0 → 0
Time: 450.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 r226806 = x;
        double r226807 = y;
        double r226808 = r226806 + r226807;
        double r226809 = 2.0;
        double r226810 = r226808 / r226809;
        return r226810;
}

double f(double x, double y) {
        double r226811 = x;
        double r226812 = y;
        double r226813 = r226811 + r226812;
        double r226814 = 2.0;
        double r226815 = r226813 / r226814;
        return r226815;
}

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