Average Error: 0.0 → 0.0
Time: 6.1s
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 r561057 = x;
        double r561058 = r561057 * r561057;
        double r561059 = 2.0;
        double r561060 = r561057 * r561059;
        double r561061 = y;
        double r561062 = r561060 * r561061;
        double r561063 = r561058 + r561062;
        double r561064 = r561061 * r561061;
        double r561065 = r561063 + r561064;
        return r561065;
}

double f(double x, double y) {
        double r561066 = x;
        double r561067 = r561066 * r561066;
        double r561068 = 2.0;
        double r561069 = r561066 * r561068;
        double r561070 = y;
        double r561071 = r561069 * r561070;
        double r561072 = r561067 + r561071;
        double r561073 = r561070 * r561070;
        double r561074 = r561072 + r561073;
        return r561074;
}

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