Average Error: 0.0 → 0.0
Time: 3.1s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\[y \cdot \left(x \cdot 2 + y\right) + x \cdot x\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
y \cdot \left(x \cdot 2 + y\right) + x \cdot x
double f(double x, double y) {
        double r396094 = x;
        double r396095 = r396094 * r396094;
        double r396096 = 2.0;
        double r396097 = r396094 * r396096;
        double r396098 = y;
        double r396099 = r396097 * r396098;
        double r396100 = r396095 + r396099;
        double r396101 = r396098 * r396098;
        double r396102 = r396100 + r396101;
        return r396102;
}

double f(double x, double y) {
        double r396103 = y;
        double r396104 = x;
        double r396105 = 2.0;
        double r396106 = r396104 * r396105;
        double r396107 = r396106 + r396103;
        double r396108 = r396103 * r396107;
        double r396109 = r396104 * r396104;
        double r396110 = r396108 + r396109;
        return r396110;
}

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

Reproduce

herbie shell --seed 2019294 
(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)))