Average Error: 0.0 → 0.0
Time: 2.3s
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 r612471 = x;
        double r612472 = r612471 * r612471;
        double r612473 = y;
        double r612474 = r612472 + r612473;
        double r612475 = r612474 + r612473;
        return r612475;
}

double f(double x, double y) {
        double r612476 = x;
        double r612477 = 2.0;
        double r612478 = pow(r612476, r612477);
        double r612479 = y;
        double r612480 = r612477 * r612479;
        double r612481 = r612478 + r612480;
        return r612481;
}

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 2019306 
(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))