Average Error: 0 → 0
Time: 1.3s
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 r36229578 = 1.0;
        double r36229579 = 2.0;
        double r36229580 = r36229578 / r36229579;
        double r36229581 = x;
        double r36229582 = y;
        double r36229583 = r36229581 + r36229582;
        double r36229584 = r36229580 * r36229583;
        return r36229584;
}

double f(double x, double y) {
        double r36229585 = 1.0;
        double r36229586 = 2.0;
        double r36229587 = r36229585 / r36229586;
        double r36229588 = x;
        double r36229589 = y;
        double r36229590 = r36229588 + r36229589;
        double r36229591 = r36229587 * r36229590;
        return r36229591;
}

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 2019172 +o rules:numerics
(FPCore (x y)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, G"

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

  (* (/ 1.0 2.0) (+ x y)))