Average Error: 0 → 0
Time: 705.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 r141704 = x;
        double r141705 = y;
        double r141706 = r141704 + r141705;
        double r141707 = 2.0;
        double r141708 = r141706 / r141707;
        return r141708;
}

double f(double x, double y) {
        double r141709 = x;
        double r141710 = y;
        double r141711 = r141709 + r141710;
        double r141712 = 2.0;
        double r141713 = r141711 / r141712;
        return r141713;
}

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