Average Error: 0 → 0
Time: 360.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 r254572 = x;
        double r254573 = y;
        double r254574 = r254572 + r254573;
        double r254575 = 2.0;
        double r254576 = r254574 / r254575;
        return r254576;
}

double f(double x, double y) {
        double r254577 = x;
        double r254578 = y;
        double r254579 = r254577 + r254578;
        double r254580 = 2.0;
        double r254581 = r254579 / r254580;
        return r254581;
}

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