Average Error: 0.0 → 0.0
Time: 11.6s
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 r583748 = x;
        double r583749 = r583748 * r583748;
        double r583750 = 2.0;
        double r583751 = r583748 * r583750;
        double r583752 = y;
        double r583753 = r583751 * r583752;
        double r583754 = r583749 + r583753;
        double r583755 = r583752 * r583752;
        double r583756 = r583754 + r583755;
        return r583756;
}

double f(double x, double y) {
        double r583757 = y;
        double r583758 = r583757 * r583757;
        double r583759 = x;
        double r583760 = r583759 * r583759;
        double r583761 = 2.0;
        double r583762 = r583759 * r583761;
        double r583763 = r583762 * r583757;
        double r583764 = r583760 + r583763;
        double r583765 = r583758 + r583764;
        return r583765;
}

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