Average Error: 0 → 0
Time: 1.3s
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 r16527 = x;
        double r16528 = y;
        double r16529 = r16527 + r16528;
        double r16530 = 2.0;
        double r16531 = r16529 / r16530;
        return r16531;
}

double f(double x, double y) {
        double r16532 = x;
        double r16533 = y;
        double r16534 = r16532 + r16533;
        double r16535 = 2.0;
        double r16536 = r16534 / r16535;
        return r16536;
}

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 1 
(FPCore (x y)
  :name "(x + y)/2"
  :precision binary64
  (/ (+ x y) 2))