Average Error: 0.0 → 0.0
Time: 15.7s
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 r533707 = x;
        double r533708 = r533707 * r533707;
        double r533709 = 2.0;
        double r533710 = r533707 * r533709;
        double r533711 = y;
        double r533712 = r533710 * r533711;
        double r533713 = r533708 + r533712;
        double r533714 = r533711 * r533711;
        double r533715 = r533713 + r533714;
        return r533715;
}

double f(double x, double y) {
        double r533716 = x;
        double r533717 = r533716 * r533716;
        double r533718 = 2.0;
        double r533719 = r533716 * r533718;
        double r533720 = y;
        double r533721 = r533719 * r533720;
        double r533722 = r533717 + r533721;
        double r533723 = r533720 * r533720;
        double r533724 = r533722 + r533723;
        return r533724;
}

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