Average Error: 0.0 → 0.0
Time: 6.3s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\[y \cdot y + x \cdot \left(x + 2 \cdot y\right)\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
y \cdot y + x \cdot \left(x + 2 \cdot y\right)
double f(double x, double y) {
        double r545168 = x;
        double r545169 = r545168 * r545168;
        double r545170 = 2.0;
        double r545171 = r545168 * r545170;
        double r545172 = y;
        double r545173 = r545171 * r545172;
        double r545174 = r545169 + r545173;
        double r545175 = r545172 * r545172;
        double r545176 = r545174 + r545175;
        return r545176;
}

double f(double x, double y) {
        double r545177 = y;
        double r545178 = r545177 * r545177;
        double r545179 = x;
        double r545180 = 2.0;
        double r545181 = r545180 * r545177;
        double r545182 = r545179 + r545181;
        double r545183 = r545179 * r545182;
        double r545184 = r545178 + r545183;
        return r545184;
}

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. Simplified0.0

    \[\leadsto \color{blue}{y \cdot y + x \cdot \left(x + y \cdot 2\right)}\]
  3. Final simplification0.0

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

Reproduce

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

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

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