Average Error: 0.0 → 0.0
Time: 5.4s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\[y \cdot y + x \cdot \left(2 \cdot y + x\right)\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
y \cdot y + x \cdot \left(2 \cdot y + x\right)
double f(double x, double y) {
        double r415148 = x;
        double r415149 = r415148 * r415148;
        double r415150 = 2.0;
        double r415151 = r415148 * r415150;
        double r415152 = y;
        double r415153 = r415151 * r415152;
        double r415154 = r415149 + r415153;
        double r415155 = r415152 * r415152;
        double r415156 = r415154 + r415155;
        return r415156;
}

double f(double x, double y) {
        double r415157 = y;
        double r415158 = r415157 * r415157;
        double r415159 = x;
        double r415160 = 2.0;
        double r415161 = r415160 * r415157;
        double r415162 = r415161 + r415159;
        double r415163 = r415159 * r415162;
        double r415164 = r415158 + r415163;
        return r415164;
}

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. Simplified0.0

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

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

Reproduce

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