Average Error: 0.0 → 0.0
Time: 2.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 r663883 = x;
        double r663884 = r663883 * r663883;
        double r663885 = 2.0;
        double r663886 = r663883 * r663885;
        double r663887 = y;
        double r663888 = r663886 * r663887;
        double r663889 = r663884 + r663888;
        double r663890 = r663887 * r663887;
        double r663891 = r663889 + r663890;
        return r663891;
}

double f(double x, double y) {
        double r663892 = x;
        double r663893 = 2.0;
        double r663894 = pow(r663892, r663893);
        double r663895 = y;
        double r663896 = 2.0;
        double r663897 = r663892 * r663896;
        double r663898 = r663897 + r663895;
        double r663899 = r663895 * r663898;
        double r663900 = r663894 + r663899;
        return r663900;
}

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 2020036 
(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)))