Average Error: 0 → 0
Time: 825.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 r461104 = 1.0;
        double r461105 = 2.0;
        double r461106 = r461104 / r461105;
        double r461107 = x;
        double r461108 = y;
        double r461109 = r461107 + r461108;
        double r461110 = r461106 * r461109;
        return r461110;
}

double f(double x, double y) {
        double r461111 = 1.0;
        double r461112 = 2.0;
        double r461113 = r461111 / r461112;
        double r461114 = x;
        double r461115 = y;
        double r461116 = r461114 + r461115;
        double r461117 = r461113 * r461116;
        return r461117;
}

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