Average Error: 0.0 → 0.0
Time: 1.7s
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 r521942 = 2.0;
        double r521943 = x;
        double r521944 = r521943 * r521943;
        double r521945 = y;
        double r521946 = r521943 * r521945;
        double r521947 = r521944 + r521946;
        double r521948 = r521942 * r521947;
        return r521948;
}

double f(double x, double y) {
        double r521949 = 2.0;
        double r521950 = x;
        double r521951 = r521950 * r521950;
        double r521952 = y;
        double r521953 = r521950 * r521952;
        double r521954 = r521951 + r521953;
        double r521955 = r521949 * r521954;
        return r521955;
}

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