Average Error: 0.0 → 0.0
Time: 10.4s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
double f(double x, double y) {
        double r694880 = x;
        double r694881 = r694880 * r694880;
        double r694882 = 2.0;
        double r694883 = r694880 * r694882;
        double r694884 = y;
        double r694885 = r694883 * r694884;
        double r694886 = r694881 + r694885;
        double r694887 = r694884 * r694884;
        double r694888 = r694886 + r694887;
        return r694888;
}

double f(double x, double y) {
        double r694889 = x;
        double r694890 = r694889 * r694889;
        double r694891 = 2.0;
        double r694892 = r694889 * r694891;
        double r694893 = y;
        double r694894 = r694892 * r694893;
        double r694895 = r694890 + r694894;
        double r694896 = r694893 * r694893;
        double r694897 = r694895 + r694896;
        return r694897;
}

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

Derivation

  1. Initial program 0.0

    \[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
  2. Final simplification0.0

    \[\leadsto \left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]

Reproduce

herbie shell --seed 2020047 
(FPCore (x y)
  :name "Examples.Basics.ProofTests:f4 from sbv-4.4"
  :precision binary64

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

  (+ (+ (* x x) (* (* x 2) y)) (* y y)))