Average Error: 0.0 → 0.0
Time: 1.8s
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 r483679 = 2.0;
        double r483680 = x;
        double r483681 = r483680 * r483680;
        double r483682 = y;
        double r483683 = r483680 * r483682;
        double r483684 = r483681 + r483683;
        double r483685 = r483679 * r483684;
        return r483685;
}

double f(double x, double y) {
        double r483686 = 2.0;
        double r483687 = x;
        double r483688 = r483687 * r483687;
        double r483689 = y;
        double r483690 = r483687 * r483689;
        double r483691 = r483688 + r483690;
        double r483692 = r483686 * r483691;
        return r483692;
}

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