Average Error: 0 → 0
Time: 2.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 r58869789 = x;
        double r58869790 = y;
        double r58869791 = r58869789 + r58869790;
        double r58869792 = 2.0;
        double r58869793 = r58869791 / r58869792;
        return r58869793;
}

double f(double x, double y) {
        double r58869794 = x;
        double r58869795 = y;
        double r58869796 = r58869794 + r58869795;
        double r58869797 = 2.0;
        double r58869798 = r58869796 / r58869797;
        return r58869798;
}

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"
  (/ (+ x y) 2.0))