Average Error: 0.0 → 0.0
Time: 10.5s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2.0\right) \cdot y\right) + y \cdot y\]
\[y \cdot y + x \cdot \left(x + 2.0 \cdot y\right)\]
\left(x \cdot x + \left(x \cdot 2.0\right) \cdot y\right) + y \cdot y
y \cdot y + x \cdot \left(x + 2.0 \cdot y\right)
double f(double x, double y) {
        double r33716860 = x;
        double r33716861 = r33716860 * r33716860;
        double r33716862 = 2.0;
        double r33716863 = r33716860 * r33716862;
        double r33716864 = y;
        double r33716865 = r33716863 * r33716864;
        double r33716866 = r33716861 + r33716865;
        double r33716867 = r33716864 * r33716864;
        double r33716868 = r33716866 + r33716867;
        return r33716868;
}

double f(double x, double y) {
        double r33716869 = y;
        double r33716870 = r33716869 * r33716869;
        double r33716871 = x;
        double r33716872 = 2.0;
        double r33716873 = r33716872 * r33716869;
        double r33716874 = r33716871 + r33716873;
        double r33716875 = r33716871 * r33716874;
        double r33716876 = r33716870 + r33716875;
        return r33716876;
}

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.0\right)\]

Derivation

  1. Initial program 0.0

    \[\left(x \cdot x + \left(x \cdot 2.0\right) \cdot y\right) + y \cdot y\]
  2. Simplified0.0

    \[\leadsto \color{blue}{y \cdot y + x \cdot \left(x + y \cdot 2.0\right)}\]
  3. Final simplification0.0

    \[\leadsto y \cdot y + x \cdot \left(x + 2.0 \cdot y\right)\]

Reproduce

herbie shell --seed 2019165 
(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)))