Average Error: 0.0 → 0.0
Time: 2.7s
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 r416583 = x;
        double r416584 = 2.0;
        double r416585 = r416583 * r416584;
        double r416586 = r416583 * r416583;
        double r416587 = r416585 + r416586;
        double r416588 = y;
        double r416589 = r416588 * r416588;
        double r416590 = r416587 + r416589;
        return r416590;
}

double f(double x, double y) {
        double r416591 = x;
        double r416592 = 2.0;
        double r416593 = r416591 * r416592;
        double r416594 = r416591 * r416591;
        double r416595 = r416593 + r416594;
        double r416596 = y;
        double r416597 = r416596 * r416596;
        double r416598 = r416595 + r416597;
        return r416598;
}

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 2020060 +o rules:numerics
(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)))