Average Error: 0.0 → 0.0
Time: 8.7s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\[y \cdot y + x \cdot \left(2 \cdot y + x\right)\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
y \cdot y + x \cdot \left(2 \cdot y + x\right)
double f(double x, double y) {
        double r686168 = x;
        double r686169 = r686168 * r686168;
        double r686170 = 2.0;
        double r686171 = r686168 * r686170;
        double r686172 = y;
        double r686173 = r686171 * r686172;
        double r686174 = r686169 + r686173;
        double r686175 = r686172 * r686172;
        double r686176 = r686174 + r686175;
        return r686176;
}

double f(double x, double y) {
        double r686177 = y;
        double r686178 = r686177 * r686177;
        double r686179 = x;
        double r686180 = 2.0;
        double r686181 = r686180 * r686177;
        double r686182 = r686181 + r686179;
        double r686183 = r686179 * r686182;
        double r686184 = r686178 + r686183;
        return r686184;
}

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(2 \cdot y + x\right)}\]
  3. Final simplification0.0

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

Reproduce

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