Average Error: 0 → 0
Time: 386.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 r242696 = x;
        double r242697 = y;
        double r242698 = r242696 + r242697;
        double r242699 = 2.0;
        double r242700 = r242698 / r242699;
        return r242700;
}

double f(double x, double y) {
        double r242701 = x;
        double r242702 = y;
        double r242703 = r242701 + r242702;
        double r242704 = 2.0;
        double r242705 = r242703 / r242704;
        return r242705;
}

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