Average Error: 0 → 0
Time: 344.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 r301677 = x;
        double r301678 = y;
        double r301679 = r301677 + r301678;
        double r301680 = 2.0;
        double r301681 = r301679 / r301680;
        return r301681;
}

double f(double x, double y) {
        double r301682 = x;
        double r301683 = y;
        double r301684 = r301682 + r301683;
        double r301685 = 2.0;
        double r301686 = r301684 / r301685;
        return r301686;
}

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