Average Error: 0 → 0
Time: 436.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 r233869 = x;
        double r233870 = y;
        double r233871 = r233869 + r233870;
        double r233872 = 2.0;
        double r233873 = r233871 / r233872;
        return r233873;
}

double f(double x, double y) {
        double r233874 = x;
        double r233875 = y;
        double r233876 = r233874 + r233875;
        double r233877 = 2.0;
        double r233878 = r233876 / r233877;
        return r233878;
}

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