Average Error: 0.0 → 0.0
Time: 7.2s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\[x \cdot \left(2 \cdot y + x\right) + y \cdot y\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
x \cdot \left(2 \cdot y + x\right) + y \cdot y
double f(double x, double y) {
        double r600036 = x;
        double r600037 = r600036 * r600036;
        double r600038 = 2.0;
        double r600039 = r600036 * r600038;
        double r600040 = y;
        double r600041 = r600039 * r600040;
        double r600042 = r600037 + r600041;
        double r600043 = r600040 * r600040;
        double r600044 = r600042 + r600043;
        return r600044;
}

double f(double x, double y) {
        double r600045 = x;
        double r600046 = 2.0;
        double r600047 = y;
        double r600048 = r600046 * r600047;
        double r600049 = r600048 + r600045;
        double r600050 = r600045 * r600049;
        double r600051 = r600047 * r600047;
        double r600052 = r600050 + r600051;
        return r600052;
}

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. Taylor expanded around 0 0.0

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

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

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

Reproduce

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