Average Error: 0 → 0
Time: 896.0ms
Precision: 64
\[\frac{a + b}{2}\]
\[\frac{a + b}{2}\]
\frac{a + b}{2}
\frac{a + b}{2}
double f(double a, double b) {
        double r619581 = a;
        double r619582 = b;
        double r619583 = r619581 + r619582;
        double r619584 = 2.0;
        double r619585 = r619583 / r619584;
        return r619585;
}

double f(double a, double b) {
        double r619586 = a;
        double r619587 = b;
        double r619588 = r619586 + r619587;
        double r619589 = 2.0;
        double r619590 = r619588 / r619589;
        return r619590;
}

Error

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0

    \[\frac{a + b}{2}\]
  2. Final simplification0

    \[\leadsto \frac{a + b}{2}\]

Reproduce

herbie shell --seed 1 
(FPCore (a b)
  :name "(a+b)/2"
  :precision binary64
  (/ (+ a b) 2))