Average Error: 0.0 → 0.0
Time: 10.8s
Precision: 64
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\[y \cdot y + x \cdot \left(2 + x\right)\]
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
y \cdot y + x \cdot \left(2 + x\right)
double f(double x, double y) {
        double r31439461 = x;
        double r31439462 = 2.0;
        double r31439463 = r31439461 * r31439462;
        double r31439464 = r31439461 * r31439461;
        double r31439465 = r31439463 + r31439464;
        double r31439466 = y;
        double r31439467 = r31439466 * r31439466;
        double r31439468 = r31439465 + r31439467;
        return r31439468;
}

double f(double x, double y) {
        double r31439469 = y;
        double r31439470 = r31439469 * r31439469;
        double r31439471 = x;
        double r31439472 = 2.0;
        double r31439473 = r31439472 + r31439471;
        double r31439474 = r31439471 * r31439473;
        double r31439475 = r31439470 + r31439474;
        return r31439475;
}

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. Simplified0.0

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

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

Reproduce

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