Average Error: 0 → 0
Time: 899.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 r1136513 = 1.0;
        double r1136514 = 2.0;
        double r1136515 = r1136513 / r1136514;
        double r1136516 = x;
        double r1136517 = y;
        double r1136518 = r1136516 + r1136517;
        double r1136519 = r1136515 * r1136518;
        return r1136519;
}

double f(double x, double y) {
        double r1136520 = 1.0;
        double r1136521 = 2.0;
        double r1136522 = r1136520 / r1136521;
        double r1136523 = x;
        double r1136524 = y;
        double r1136525 = r1136523 + r1136524;
        double r1136526 = r1136522 * r1136525;
        return r1136526;
}

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 2019303 +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)))