Average Error: 0.0 → 0.0
Time: 1.2s
Precision: 64
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
double f(double x, double y) {
        double r521691 = x;
        double r521692 = 2.0;
        double r521693 = r521691 * r521692;
        double r521694 = r521691 * r521691;
        double r521695 = r521693 + r521694;
        double r521696 = y;
        double r521697 = r521696 * r521696;
        double r521698 = r521695 + r521697;
        return r521698;
}

double f(double x, double y) {
        double r521699 = x;
        double r521700 = 2.0;
        double r521701 = r521699 * r521700;
        double r521702 = r521699 * r521699;
        double r521703 = r521701 + r521702;
        double r521704 = y;
        double r521705 = r521704 * r521704;
        double r521706 = r521703 + r521705;
        return r521706;
}

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
\[y \cdot y + \left(2 \cdot x + x \cdot x\right)\]

Derivation

  1. Initial program 0.0

    \[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
  2. Final simplification0.0

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

Reproduce

herbie shell --seed 2020062 
(FPCore (x y)
  :name "Numeric.Log:$clog1p from log-domain-0.10.2.1, A"
  :precision binary64

  :herbie-target
  (+ (* y y) (+ (* 2 x) (* x x)))

  (+ (+ (* x 2) (* x x)) (* y y)))