Average Error: 0 → 0
Time: 1.5s
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 r662516 = 1.0;
        double r662517 = 2.0;
        double r662518 = r662516 / r662517;
        double r662519 = x;
        double r662520 = y;
        double r662521 = r662519 + r662520;
        double r662522 = r662518 * r662521;
        return r662522;
}

double f(double x, double y) {
        double r662523 = 1.0;
        double r662524 = 2.0;
        double r662525 = r662523 / r662524;
        double r662526 = x;
        double r662527 = y;
        double r662528 = r662526 + r662527;
        double r662529 = r662525 * r662528;
        return r662529;
}

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