Average Error: 0 → 0
Time: 370.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 r242773 = x;
        double r242774 = y;
        double r242775 = r242773 + r242774;
        double r242776 = 2.0;
        double r242777 = r242775 / r242776;
        return r242777;
}

double f(double x, double y) {
        double r242778 = x;
        double r242779 = y;
        double r242780 = r242778 + r242779;
        double r242781 = 2.0;
        double r242782 = r242780 / r242781;
        return r242782;
}

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