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 r282559 = x;
        double r282560 = y;
        double r282561 = r282559 + r282560;
        double r282562 = 2.0;
        double r282563 = r282561 / r282562;
        return r282563;
}

double f(double x, double y) {
        double r282564 = x;
        double r282565 = y;
        double r282566 = r282564 + r282565;
        double r282567 = 2.0;
        double r282568 = r282566 / r282567;
        return r282568;
}

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