Average Error: 0 → 0
Time: 363.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 r247059 = x;
        double r247060 = y;
        double r247061 = r247059 + r247060;
        double r247062 = 2.0;
        double r247063 = r247061 / r247062;
        return r247063;
}

double f(double x, double y) {
        double r247064 = x;
        double r247065 = y;
        double r247066 = r247064 + r247065;
        double r247067 = 2.0;
        double r247068 = r247066 / r247067;
        return r247068;
}

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