Average Error: 0.0 → 0.0
Time: 624.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 r479512 = 2.0;
        double r479513 = x;
        double r479514 = r479513 * r479513;
        double r479515 = y;
        double r479516 = r479513 * r479515;
        double r479517 = r479514 + r479516;
        double r479518 = r479512 * r479517;
        return r479518;
}

double f(double x, double y) {
        double r479519 = 2.0;
        double r479520 = x;
        double r479521 = r479520 * r479520;
        double r479522 = y;
        double r479523 = r479520 * r479522;
        double r479524 = r479521 + r479523;
        double r479525 = r479519 * r479524;
        return r479525;
}

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