Average Error: 0.0 → 0.0
Time: 5.3s
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 r447172 = x;
        double r447173 = r447172 * r447172;
        double r447174 = 2.0;
        double r447175 = r447172 * r447174;
        double r447176 = y;
        double r447177 = r447175 * r447176;
        double r447178 = r447173 + r447177;
        double r447179 = r447176 * r447176;
        double r447180 = r447178 + r447179;
        return r447180;
}

double f(double x, double y) {
        double r447181 = y;
        double r447182 = r447181 * r447181;
        double r447183 = x;
        double r447184 = 2.0;
        double r447185 = r447184 * r447181;
        double r447186 = r447185 + r447183;
        double r447187 = r447183 * r447186;
        double r447188 = r447182 + r447187;
        return r447188;
}

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