Average Error: 0 → 0
Time: 340.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 r244955 = x;
        double r244956 = y;
        double r244957 = r244955 + r244956;
        double r244958 = 2.0;
        double r244959 = r244957 / r244958;
        return r244959;
}

double f(double x, double y) {
        double r244960 = x;
        double r244961 = y;
        double r244962 = r244960 + r244961;
        double r244963 = 2.0;
        double r244964 = r244962 / r244963;
        return r244964;
}

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