Average Error: 0 → 0
Time: 315.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 r218858 = x;
        double r218859 = y;
        double r218860 = r218858 + r218859;
        double r218861 = 2.0;
        double r218862 = r218860 / r218861;
        return r218862;
}

double f(double x, double y) {
        double r218863 = x;
        double r218864 = y;
        double r218865 = r218863 + r218864;
        double r218866 = 2.0;
        double r218867 = r218865 / r218866;
        return r218867;
}

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