Average Error: 0 → 0
Time: 468.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 r719025 = 1.0;
        double r719026 = 2.0;
        double r719027 = r719025 / r719026;
        double r719028 = x;
        double r719029 = y;
        double r719030 = r719028 + r719029;
        double r719031 = r719027 * r719030;
        return r719031;
}

double f(double x, double y) {
        double r719032 = 1.0;
        double r719033 = 2.0;
        double r719034 = r719032 / r719033;
        double r719035 = x;
        double r719036 = y;
        double r719037 = r719035 + r719036;
        double r719038 = r719034 * r719037;
        return r719038;
}

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