Average Error: 0.0 → 0.0
Time: 887.0ms
Precision: 64
\[2 \cdot \left(x \cdot x + x \cdot y\right)\]
\[2 \cdot \left(x \cdot x + x \cdot y\right)\]
2 \cdot \left(x \cdot x + x \cdot y\right)
2 \cdot \left(x \cdot x + x \cdot y\right)
double f(double x, double y) {
        double r522941 = 2.0;
        double r522942 = x;
        double r522943 = r522942 * r522942;
        double r522944 = y;
        double r522945 = r522942 * r522944;
        double r522946 = r522943 + r522945;
        double r522947 = r522941 * r522946;
        return r522947;
}

double f(double x, double y) {
        double r522948 = 2.0;
        double r522949 = x;
        double r522950 = r522949 * r522949;
        double r522951 = y;
        double r522952 = r522949 * r522951;
        double r522953 = r522950 + r522952;
        double r522954 = r522948 * r522953;
        return r522954;
}

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.0
Target0.0
Herbie0.0
\[\left(x \cdot 2\right) \cdot \left(x + y\right)\]

Derivation

  1. Initial program 0.0

    \[2 \cdot \left(x \cdot x + x \cdot y\right)\]
  2. Final simplification0.0

    \[\leadsto 2 \cdot \left(x \cdot x + x \cdot y\right)\]

Reproduce

herbie shell --seed 2019356 
(FPCore (x y)
  :name "Linear.Matrix:fromQuaternion from linear-1.19.1.3, B"
  :precision binary64

  :herbie-target
  (* (* x 2) (+ x y))

  (* 2 (+ (* x x) (* x y))))