Average Error: 0 → 0
Time: 808.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 r742926 = 1.0;
        double r742927 = 2.0;
        double r742928 = r742926 / r742927;
        double r742929 = x;
        double r742930 = y;
        double r742931 = r742929 + r742930;
        double r742932 = r742928 * r742931;
        return r742932;
}

double f(double x, double y) {
        double r742933 = 1.0;
        double r742934 = 2.0;
        double r742935 = r742933 / r742934;
        double r742936 = x;
        double r742937 = y;
        double r742938 = r742936 + r742937;
        double r742939 = r742935 * r742938;
        return r742939;
}

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