Average Error: 0.0 → 0.0
Time: 3.1s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\[{x}^{2} + y \cdot \left(x \cdot 2 + y\right)\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
{x}^{2} + y \cdot \left(x \cdot 2 + y\right)
double f(double x, double y) {
        double r762883 = x;
        double r762884 = r762883 * r762883;
        double r762885 = 2.0;
        double r762886 = r762883 * r762885;
        double r762887 = y;
        double r762888 = r762886 * r762887;
        double r762889 = r762884 + r762888;
        double r762890 = r762887 * r762887;
        double r762891 = r762889 + r762890;
        return r762891;
}

double f(double x, double y) {
        double r762892 = x;
        double r762893 = 2.0;
        double r762894 = pow(r762892, r762893);
        double r762895 = y;
        double r762896 = 2.0;
        double r762897 = r762892 * r762896;
        double r762898 = r762897 + r762895;
        double r762899 = r762895 * r762898;
        double r762900 = r762894 + r762899;
        return r762900;
}

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}{{x}^{2} + \left({y}^{2} + 2 \cdot \left(x \cdot y\right)\right)}\]
  3. Simplified0.0

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

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

Reproduce

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