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 r238931 = x;
        double r238932 = y;
        double r238933 = r238931 + r238932;
        double r238934 = 2.0;
        double r238935 = r238933 / r238934;
        return r238935;
}

double f(double x, double y) {
        double r238936 = x;
        double r238937 = y;
        double r238938 = r238936 + r238937;
        double r238939 = 2.0;
        double r238940 = r238938 / r238939;
        return r238940;
}

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