Average Error: 0.0 → 0.0
Time: 2.8s
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 r724716 = x;
        double r724717 = r724716 * r724716;
        double r724718 = 2.0;
        double r724719 = r724716 * r724718;
        double r724720 = y;
        double r724721 = r724719 * r724720;
        double r724722 = r724717 + r724721;
        double r724723 = r724720 * r724720;
        double r724724 = r724722 + r724723;
        return r724724;
}

double f(double x, double y) {
        double r724725 = x;
        double r724726 = r724725 * r724725;
        double r724727 = 2.0;
        double r724728 = r724725 * r724727;
        double r724729 = y;
        double r724730 = r724728 * r724729;
        double r724731 = r724726 + r724730;
        double r724732 = r724729 * r724729;
        double r724733 = r724731 + r724732;
        return r724733;
}

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 2020027 +o rules:numerics
(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)))