Average Error: 0 → 0
Time: 420.0ms
Precision: 64
\[\frac{1}{2} \cdot \left(x + y\right)\]
\[\frac{1}{2} \cdot \left(x + y\right)\]
\frac{1}{2} \cdot \left(x + y\right)
\frac{1}{2} \cdot \left(x + y\right)
double f(double x, double y) {
        double r654477 = 1.0;
        double r654478 = 2.0;
        double r654479 = r654477 / r654478;
        double r654480 = x;
        double r654481 = y;
        double r654482 = r654480 + r654481;
        double r654483 = r654479 * r654482;
        return r654483;
}

double f(double x, double y) {
        double r654484 = 1.0;
        double r654485 = 2.0;
        double r654486 = r654484 / r654485;
        double r654487 = x;
        double r654488 = y;
        double r654489 = r654487 + r654488;
        double r654490 = r654486 * r654489;
        return r654490;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0
Target0
Herbie0
\[\frac{x + y}{2}\]

Derivation

  1. Initial program 0

    \[\frac{1}{2} \cdot \left(x + y\right)\]
  2. Final simplification0

    \[\leadsto \frac{1}{2} \cdot \left(x + y\right)\]

Reproduce

herbie shell --seed 2020001 +o rules:numerics
(FPCore (x y)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, G"
  :precision binary64

  :herbie-target
  (/ (+ x y) 2)

  (* (/ 1 2) (+ x y)))