Average Error: 0 → 0
Time: 1.1s
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 r640858 = 1.0;
        double r640859 = 2.0;
        double r640860 = r640858 / r640859;
        double r640861 = x;
        double r640862 = y;
        double r640863 = r640861 + r640862;
        double r640864 = r640860 * r640863;
        return r640864;
}

double f(double x, double y) {
        double r640865 = 1.0;
        double r640866 = 2.0;
        double r640867 = r640865 / r640866;
        double r640868 = x;
        double r640869 = y;
        double r640870 = r640868 + r640869;
        double r640871 = r640867 * r640870;
        return r640871;
}

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 2019194 +o rules:numerics
(FPCore (x y)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, G"

  :herbie-target
  (/ (+ x y) 2.0)

  (* (/ 1.0 2.0) (+ x y)))