Average Error: 0.0 → 0.0
Time: 7.8s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\[y \cdot y + \left(x \cdot x + \left(x \cdot 2\right) \cdot y\right)\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
y \cdot y + \left(x \cdot x + \left(x \cdot 2\right) \cdot y\right)
double f(double x, double y) {
        double r35511637 = x;
        double r35511638 = r35511637 * r35511637;
        double r35511639 = 2.0;
        double r35511640 = r35511637 * r35511639;
        double r35511641 = y;
        double r35511642 = r35511640 * r35511641;
        double r35511643 = r35511638 + r35511642;
        double r35511644 = r35511641 * r35511641;
        double r35511645 = r35511643 + r35511644;
        return r35511645;
}

double f(double x, double y) {
        double r35511646 = y;
        double r35511647 = r35511646 * r35511646;
        double r35511648 = x;
        double r35511649 = r35511648 * r35511648;
        double r35511650 = 2.0;
        double r35511651 = r35511648 * r35511650;
        double r35511652 = r35511651 * r35511646;
        double r35511653 = r35511649 + r35511652;
        double r35511654 = r35511647 + r35511653;
        return r35511654;
}

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 y \cdot y + \left(x \cdot x + \left(x \cdot 2\right) \cdot y\right)\]

Reproduce

herbie shell --seed 2019169 
(FPCore (x y)
  :name "Examples.Basics.ProofTests:f4 from sbv-4.4"

  :herbie-target
  (+ (* x x) (+ (* y y) (* (* x y) 2.0)))

  (+ (+ (* x x) (* (* x 2.0) y)) (* y y)))