Average Error: 0 → 0
Time: 310.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 r232786 = x;
        double r232787 = y;
        double r232788 = r232786 + r232787;
        double r232789 = 2.0;
        double r232790 = r232788 / r232789;
        return r232790;
}

double f(double x, double y) {
        double r232791 = x;
        double r232792 = y;
        double r232793 = r232791 + r232792;
        double r232794 = 2.0;
        double r232795 = r232793 / r232794;
        return r232795;
}

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