Average Error: 0.0 → 0.0
Time: 5.0s
Precision: 64
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\[y \cdot y + \left(x \cdot x + x \cdot 2\right)\]
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
y \cdot y + \left(x \cdot x + x \cdot 2\right)
double f(double x, double y) {
        double r23898582 = x;
        double r23898583 = 2.0;
        double r23898584 = r23898582 * r23898583;
        double r23898585 = r23898582 * r23898582;
        double r23898586 = r23898584 + r23898585;
        double r23898587 = y;
        double r23898588 = r23898587 * r23898587;
        double r23898589 = r23898586 + r23898588;
        return r23898589;
}

double f(double x, double y) {
        double r23898590 = y;
        double r23898591 = r23898590 * r23898590;
        double r23898592 = x;
        double r23898593 = r23898592 * r23898592;
        double r23898594 = 2.0;
        double r23898595 = r23898592 * r23898594;
        double r23898596 = r23898593 + r23898595;
        double r23898597 = r23898591 + r23898596;
        return r23898597;
}

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

Reproduce

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

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

  (+ (+ (* x 2.0) (* x x)) (* y y)))