Average Error: 0.0 → 0.0
Time: 840.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 r564784 = 2.0;
        double r564785 = x;
        double r564786 = r564785 * r564785;
        double r564787 = y;
        double r564788 = r564785 * r564787;
        double r564789 = r564786 + r564788;
        double r564790 = r564784 * r564789;
        return r564790;
}

double f(double x, double y) {
        double r564791 = 2.0;
        double r564792 = x;
        double r564793 = r564792 * r564792;
        double r564794 = y;
        double r564795 = r564792 * r564794;
        double r564796 = r564793 + r564795;
        double r564797 = r564791 * r564796;
        return r564797;
}

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