Average Error: 0.0 → 0.0
Time: 5.1s
Precision: 64
\[2 \cdot \left(x \cdot x + x \cdot y\right)\]
\[\left(x \cdot x + y \cdot x\right) \cdot 2\]
2 \cdot \left(x \cdot x + x \cdot y\right)
\left(x \cdot x + y \cdot x\right) \cdot 2
double f(double x, double y) {
        double r484658 = 2.0;
        double r484659 = x;
        double r484660 = r484659 * r484659;
        double r484661 = y;
        double r484662 = r484659 * r484661;
        double r484663 = r484660 + r484662;
        double r484664 = r484658 * r484663;
        return r484664;
}

double f(double x, double y) {
        double r484665 = x;
        double r484666 = r484665 * r484665;
        double r484667 = y;
        double r484668 = r484667 * r484665;
        double r484669 = r484666 + r484668;
        double r484670 = 2.0;
        double r484671 = r484669 * r484670;
        return r484671;
}

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 \left(x \cdot x + y \cdot x\right) \cdot 2\]

Reproduce

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

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

  (* 2.0 (+ (* x x) (* x y))))