Average Error: 0 → 0
Time: 323.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 r331550 = x;
        double r331551 = y;
        double r331552 = r331550 + r331551;
        double r331553 = 2.0;
        double r331554 = r331552 / r331553;
        return r331554;
}

double f(double x, double y) {
        double r331555 = x;
        double r331556 = y;
        double r331557 = r331555 + r331556;
        double r331558 = 2.0;
        double r331559 = r331557 / r331558;
        return r331559;
}

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