Average Error: 0.0 → 0.0
Time: 635.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 r652193 = 2.0;
        double r652194 = x;
        double r652195 = r652194 * r652194;
        double r652196 = y;
        double r652197 = r652194 * r652196;
        double r652198 = r652195 + r652197;
        double r652199 = r652193 * r652198;
        return r652199;
}

double f(double x, double y) {
        double r652200 = 2.0;
        double r652201 = x;
        double r652202 = r652201 * r652201;
        double r652203 = y;
        double r652204 = r652201 * r652203;
        double r652205 = r652202 + r652204;
        double r652206 = r652200 * r652205;
        return r652206;
}

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