Average Error: 0.0 → 0.0
Time: 897.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 r464877 = 2.0;
        double r464878 = x;
        double r464879 = r464878 * r464878;
        double r464880 = y;
        double r464881 = r464878 * r464880;
        double r464882 = r464879 + r464881;
        double r464883 = r464877 * r464882;
        return r464883;
}

double f(double x, double y) {
        double r464884 = 2.0;
        double r464885 = x;
        double r464886 = r464885 * r464885;
        double r464887 = y;
        double r464888 = r464885 * r464887;
        double r464889 = r464886 + r464888;
        double r464890 = r464884 * r464889;
        return r464890;
}

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