Average Error: 0.0 → 0.0
Time: 2.5s
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 r503130 = x;
        double r503131 = r503130 * r503130;
        double r503132 = y;
        double r503133 = r503131 + r503132;
        double r503134 = r503133 + r503132;
        return r503134;
}

double f(double x, double y) {
        double r503135 = x;
        double r503136 = 2.0;
        double r503137 = pow(r503135, r503136);
        double r503138 = y;
        double r503139 = r503136 * r503138;
        double r503140 = r503137 + r503139;
        return r503140;
}

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