Average Error: 0.0 → 0.0
Time: 3.5s
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 r642044 = x;
        double r642045 = r642044 * r642044;
        double r642046 = 2.0;
        double r642047 = r642044 * r642046;
        double r642048 = y;
        double r642049 = r642047 * r642048;
        double r642050 = r642045 + r642049;
        double r642051 = r642048 * r642048;
        double r642052 = r642050 + r642051;
        return r642052;
}

double f(double x, double y) {
        double r642053 = x;
        double r642054 = r642053 * r642053;
        double r642055 = 2.0;
        double r642056 = r642053 * r642055;
        double r642057 = y;
        double r642058 = r642056 * r642057;
        double r642059 = r642054 + r642058;
        double r642060 = r642057 * r642057;
        double r642061 = r642059 + r642060;
        return r642061;
}

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