Average Error: 0.0 → 0.0
Time: 3.0s
Precision: 64
\[\left(x \cdot x + y\right) + y\]
\[{x}^{2} + 2 \cdot y\]
\left(x \cdot x + y\right) + y
{x}^{2} + 2 \cdot y
double f(double x, double y) {
        double r449490 = x;
        double r449491 = r449490 * r449490;
        double r449492 = y;
        double r449493 = r449491 + r449492;
        double r449494 = r449493 + r449492;
        return r449494;
}

double f(double x, double y) {
        double r449495 = x;
        double r449496 = 2.0;
        double r449497 = pow(r449495, r449496);
        double r449498 = y;
        double r449499 = r449496 * r449498;
        double r449500 = r449497 + r449499;
        return r449500;
}

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

Derivation

  1. Initial program 0.0

    \[\left(x \cdot x + y\right) + y\]
  2. Using strategy rm
  3. Applied *-un-lft-identity0.0

    \[\leadsto \left(x \cdot x + y\right) + \color{blue}{1 \cdot y}\]
  4. Applied *-un-lft-identity0.0

    \[\leadsto \color{blue}{1 \cdot \left(x \cdot x + y\right)} + 1 \cdot y\]
  5. Applied distribute-lft-out0.0

    \[\leadsto \color{blue}{1 \cdot \left(\left(x \cdot x + y\right) + y\right)}\]
  6. Simplified0.0

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

    \[\leadsto {x}^{2} + 2 \cdot y\]

Reproduce

herbie shell --seed 2019323 
(FPCore (x y)
  :name "Data.Random.Distribution.Normal:normalTail from random-fu-0.2.6.2"
  :precision binary64

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

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