Average Error: 0.0 → 0.0
Time: 816.0ms
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 r863125 = x;
        double r863126 = r863125 * r863125;
        double r863127 = 2.0;
        double r863128 = r863125 * r863127;
        double r863129 = y;
        double r863130 = r863128 * r863129;
        double r863131 = r863126 + r863130;
        double r863132 = r863129 * r863129;
        double r863133 = r863131 + r863132;
        return r863133;
}

double f(double x, double y) {
        double r863134 = x;
        double r863135 = r863134 * r863134;
        double r863136 = 2.0;
        double r863137 = r863134 * r863136;
        double r863138 = y;
        double r863139 = r863137 * r863138;
        double r863140 = r863135 + r863139;
        double r863141 = r863138 * r863138;
        double r863142 = r863140 + r863141;
        return r863142;
}

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 2019351 +o rules:numerics
(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)))