Average Error: 0.0 → 0.0
Time: 9.4s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\[y \cdot y + x \cdot \left(x + 2 \cdot y\right)\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
y \cdot y + x \cdot \left(x + 2 \cdot y\right)
double f(double x, double y) {
        double r33049249 = x;
        double r33049250 = r33049249 * r33049249;
        double r33049251 = 2.0;
        double r33049252 = r33049249 * r33049251;
        double r33049253 = y;
        double r33049254 = r33049252 * r33049253;
        double r33049255 = r33049250 + r33049254;
        double r33049256 = r33049253 * r33049253;
        double r33049257 = r33049255 + r33049256;
        return r33049257;
}

double f(double x, double y) {
        double r33049258 = y;
        double r33049259 = r33049258 * r33049258;
        double r33049260 = x;
        double r33049261 = 2.0;
        double r33049262 = r33049261 * r33049258;
        double r33049263 = r33049260 + r33049262;
        double r33049264 = r33049260 * r33049263;
        double r33049265 = r33049259 + r33049264;
        return r33049265;
}

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(x + y \cdot 2\right)}\]
  3. Final simplification0.0

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

Reproduce

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