Average Error: 0 → 0
Time: 1.3s
Precision: 64
\[\frac{x}{2} + \frac{y}{2}\]
\[\frac{x}{2} + \frac{y}{2}\]
\frac{x}{2} + \frac{y}{2}
\frac{x}{2} + \frac{y}{2}
double f(double x, double y) {
        double r58870109 = x;
        double r58870110 = 2.0;
        double r58870111 = r58870109 / r58870110;
        double r58870112 = y;
        double r58870113 = r58870112 / r58870110;
        double r58870114 = r58870111 + r58870113;
        return r58870114;
}

double f(double x, double y) {
        double r58870115 = x;
        double r58870116 = 2.0;
        double r58870117 = r58870115 / r58870116;
        double r58870118 = y;
        double r58870119 = r58870118 / r58870116;
        double r58870120 = r58870117 + r58870119;
        return r58870120;
}

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}{2} + \frac{y}{2}\]
  2. Final simplification0

    \[\leadsto \frac{x}{2} + \frac{y}{2}\]

Reproduce

herbie shell --seed 1 
(FPCore (x y)
  :name "x/2 + y/2"
  (+ (/ x 2.0) (/ y 2.0)))